Class CapabilitiesConfig.Builder

java.lang.Object
dev.tachyonmcp.core.server.config.CapabilitiesConfig.Builder
Enclosing class:
CapabilitiesConfig

public static final class CapabilitiesConfig.Builder extends Object
Builder for CapabilitiesConfig.
  • Method Details

    • tools

      Configures tools from a feature config.
      Parameters:
      config - the feature config
      Returns:
      this builder
    • resources

      public CapabilitiesConfig.Builder resources(ResourcesConfig config)
      Configures resources from a resources config.
      Parameters:
      config - the resources config
      Returns:
      this builder
    • prompts

      public CapabilitiesConfig.Builder prompts(FeatureConfig config)
      Configures prompts from a feature config.
      Parameters:
      config - the feature config
      Returns:
      this builder
    • tasks

      public CapabilitiesConfig.Builder tasks(TasksConfig config)
      Configures tasks from a tasks config.
      Parameters:
      config - the tasks config
      Returns:
      this builder
    • toolsMode

      public CapabilitiesConfig.Builder toolsMode(Mode toolsMode)
      Sets the tools mode.
      Parameters:
      toolsMode - the tools mode
      Returns:
      this builder
    • toolsListChanged

      public CapabilitiesConfig.Builder toolsListChanged(boolean toolsListChanged)
      Sets whether tools list change notifications are enabled.
      Parameters:
      toolsListChanged - whether tools list change notifications are enabled
      Returns:
      this builder
    • toolsPageSize

      public CapabilitiesConfig.Builder toolsPageSize(int toolsPageSize)
      Sets the tools page size.
      Parameters:
      toolsPageSize - the tools page size
      Returns:
      this builder
    • resourcesMode

      public CapabilitiesConfig.Builder resourcesMode(Mode resourcesMode)
      Sets the resources mode.
      Parameters:
      resourcesMode - the resources mode
      Returns:
      this builder
    • resourcesSubscribe

      public CapabilitiesConfig.Builder resourcesSubscribe(boolean resourcesSubscribe)
      Sets whether resource subscriptions are enabled.
      Parameters:
      resourcesSubscribe - whether resource subscriptions are enabled
      Returns:
      this builder
    • resourcesListChanged

      public CapabilitiesConfig.Builder resourcesListChanged(boolean resourcesListChanged)
      Sets whether resources list change notifications are enabled.
      Parameters:
      resourcesListChanged - whether resources list change notifications are enabled
      Returns:
      this builder
    • resourcesPageSize

      public CapabilitiesConfig.Builder resourcesPageSize(int resourcesPageSize)
      Sets the resources page size.
      Parameters:
      resourcesPageSize - the resources page size
      Returns:
      this builder
    • promptsMode

      public CapabilitiesConfig.Builder promptsMode(Mode promptsMode)
      Sets the prompts mode.
      Parameters:
      promptsMode - the prompts mode
      Returns:
      this builder
    • promptsListChanged

      public CapabilitiesConfig.Builder promptsListChanged(boolean promptsListChanged)
      Sets whether prompts list change notifications are enabled.
      Parameters:
      promptsListChanged - whether prompts list change notifications are enabled
      Returns:
      this builder
    • promptsPageSize

      public CapabilitiesConfig.Builder promptsPageSize(int promptsPageSize)
      Sets the prompts page size.
      Parameters:
      promptsPageSize - the prompts page size
      Returns:
      this builder
    • completions

      public CapabilitiesConfig.Builder completions(Mode completions)
      Sets the completions mode.
      Parameters:
      completions - the completions mode
      Returns:
      this builder
    • tasksEnabled

      public CapabilitiesConfig.Builder tasksEnabled(boolean tasksEnabled)
      Sets whether tasks are enabled.
      Parameters:
      tasksEnabled - whether tasks are enabled
      Returns:
      this builder
    • tasksList

      public CapabilitiesConfig.Builder tasksList(boolean tasksList)
      Sets whether task listing is enabled.
      Parameters:
      tasksList - whether task listing is enabled
      Returns:
      this builder
    • tasksCancel

      public CapabilitiesConfig.Builder tasksCancel(boolean tasksCancel)
      Sets whether task cancellation is enabled.
      Parameters:
      tasksCancel - whether task cancellation is enabled
      Returns:
      this builder
    • tasksRequests

      public CapabilitiesConfig.Builder tasksRequests(boolean tasksRequests)
      Sets whether task requests are enabled.
      Parameters:
      tasksRequests - whether task requests are enabled
      Returns:
      this builder
    • tasksPageSize

      public CapabilitiesConfig.Builder tasksPageSize(int tasksPageSize)
      Sets the tasks page size.
      Parameters:
      tasksPageSize - the tasks page size
      Returns:
      this builder
    • tasksKeepAlive

      public CapabilitiesConfig.Builder tasksKeepAlive(Duration tasksKeepAlive)
      Sets the tasks keep-alive duration.
      Parameters:
      tasksKeepAlive - the tasks keep-alive duration
      Returns:
      this builder
    • logging

      public CapabilitiesConfig.Builder logging(boolean logging)
      Sets whether logging is enabled.
      Parameters:
      logging - whether logging is enabled
      Returns:
      this builder
    • build

      public CapabilitiesConfig build()
      Builds the CapabilitiesConfig.
      Returns:
      the built CapabilitiesConfig
    • completions

      public CapabilitiesConfig.Builder completions()
      Enables completions (Mode.ON).
      Returns:
      this builder
    • noCompletions

      public CapabilitiesConfig.Builder noCompletions()
      Disables completions (Mode.OFF).
      Returns:
      this builder
    • logging

      public CapabilitiesConfig.Builder logging()
      Enables logging.
      Returns:
      this builder
    • tools

      Enables tools with default settings.
      Returns:
      this builder
    • tools

      public CapabilitiesConfig.Builder tools(boolean listChanged)
      Enables tools with the specified list-changed setting.
      Parameters:
      listChanged - whether list change notifications are enabled
      Returns:
      this builder
    • noTools

      public CapabilitiesConfig.Builder noTools()
      Disables tools (Mode.OFF).
      Returns:
      this builder
    • resources

      public CapabilitiesConfig.Builder resources()
      Enables resources with default settings.
      Returns:
      this builder
    • resources

      public CapabilitiesConfig.Builder resources(boolean subscribe, boolean listChanged)
      Enables resources with the specified subscribe and list-changed settings.
      Parameters:
      subscribe - whether resource subscriptions are enabled
      listChanged - whether resources list change notifications are enabled
      Returns:
      this builder
    • noResources

      public CapabilitiesConfig.Builder noResources()
      Disables resources (Mode.OFF).
      Returns:
      this builder
    • prompts

      public CapabilitiesConfig.Builder prompts()
      Enables prompts with default settings.
      Returns:
      this builder
    • prompts

      public CapabilitiesConfig.Builder prompts(boolean listChanged)
      Enables prompts with the specified list-changed setting.
      Parameters:
      listChanged - whether prompts list change notifications are enabled
      Returns:
      this builder
    • noPrompts

      public CapabilitiesConfig.Builder noPrompts()
      Disables prompts (Mode.OFF).
      Returns:
      this builder
    • noTasks

      public CapabilitiesConfig.Builder noTasks()
      Disables tasks.
      Returns:
      this builder
    • tasks

      Enables tasks with default settings.
      Returns:
      this builder
    • tasks

      public CapabilitiesConfig.Builder tasks(boolean list, boolean cancel, boolean requests)
      Enables tasks with the specified list, cancel, and requests settings.
      Parameters:
      list - whether task listing is enabled
      cancel - whether task cancellation is enabled
      requests - whether task requests are enabled
      Returns:
      this builder