Class ToolSearchConfig

java.lang.Object
com.github.copilot.rpc.ToolSearchConfig

public class ToolSearchConfig extends Object
Overrides the runtime's built-in tool-search behavior.

Tool search defers tools to keep the model's active tool set small. To override the tool-search tool's implementation, register a tool named "tool_search_tool" with overridesBuiltInTool set to true.

Since:
1.3.0
  • Constructor Details

    • ToolSearchConfig

      public ToolSearchConfig()
  • Method Details

    • getEnabled

      public Boolean getEnabled()
      Gets whether tool search is enabled.
      Returns:
      true if enabled, false if disabled, or null for the runtime default
    • setEnabled

      public ToolSearchConfig setEnabled(Boolean enabled)
      Toggle that enables or disables tool search.
      Parameters:
      enabled - true to enable, false to disable
      Returns:
      this config for method chaining
    • getDeferThreshold

      public Integer getDeferThreshold()
      Gets the tool count above which MCP and external tools are deferred behind tool search.
      Returns:
      the defer threshold, or null for the runtime default (30)
    • setDeferThreshold

      public ToolSearchConfig setDeferThreshold(Integer deferThreshold)
      Sets the tool count above which MCP and external tools are deferred behind tool search. Defaults to the runtime default (30) when unset.
      Parameters:
      deferThreshold - the threshold value
      Returns:
      this config for method chaining