Class ToolSearchConfig
java.lang.Object
com.github.copilot.rpc.ToolSearchConfig
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the tool count above which MCP and external tools are deferred behind tool search.Gets whether tool search is enabled.setDeferThreshold(Integer deferThreshold) Sets the tool count above which MCP and external tools are deferred behind tool search.setEnabled(Boolean enabled) Toggle that enables or disables tool search.
-
Constructor Details
-
ToolSearchConfig
public ToolSearchConfig()
-
-
Method Details
-
getEnabled
Gets whether tool search is enabled.- Returns:
trueif enabled,falseif disabled, ornullfor the runtime default
-
setEnabled
Toggle that enables or disables tool search.- Parameters:
enabled-trueto enable,falseto disable- Returns:
- this config for method chaining
-
getDeferThreshold
Gets the tool count above which MCP and external tools are deferred behind tool search.- Returns:
- the defer threshold, or
nullfor the runtime default (30)
-
setDeferThreshold
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
-