Tool search
Give the agent a search over its tools, and load only the tool definitions a task needs.
Also called On-demand tool loading
Cursor, Anthropic, OpenAI, GitHub
The problem
Every tool definition takes room in the context window, and with too many tools the agent picks the wrong one.
Connecting MCP servers and other external tools to Copilot CLI is powerful, but every tool you add carries a cost: its definition takes up space in the model's context window, and a long menu of tools makes it harder for the agent to pick the right one.
Claude’s ability to pick the right tool degrades once you exceed 30–50 available tools.
Therefore
The tool search tool lets Claude work with hundreds or thousands of tools by discovering and loading them on demand. Instead of loading all tool definitions into the context window up front, Claude searches your tool catalog (including tool names, descriptions, argument names, and argument descriptions) and loads only the tools it needs.
Tool search allows the model to dynamically search for and load tools into the model’s context as needed. This allows you to avoid loading all tool definitions into the model’s context up front and may help reduce overall token usage and cost.
On-demand tool loading (or "tool search") prevents the context window from being cluttered by definitions for tools that the agent doesn't use. The agent starts with just its built-in tools and a way to look up the rest, then loads extra tools only when they're needed to complete a task.
In use
Claude Code
Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them. Only tool names and server instructions load at session start, so adding more MCP servers has minimal impact on your context window.
GitHub Copilot CLI
Tool search keeps your context small by letting Copilot CLI load external tools only when a task needs them.
Where it breaks
Each search costs an extra round-trip, and with only a few tools it saves too little to be worth it.
Tool search adds one extra round-trip each time Claude searches for tools, but for large tool sets this is offset by smaller context on every turn.
We considered a tool search approach, but that would scatter tools across a flat index.
Below roughly 30 tools, the savings you get from tool search aren't worth it, so Copilot CLI skips tool search entirely and just loads everything.
Sources
- Dynamic context discoveryJediah Katz, Cursor, Jan 6, 2026
- Tool search toolAnthropic
- Tool searchOpenAI
- Loading tools on demand with tool searchGitHub
On-demand tool loading (or "tool search") prevents the context window from being cluttered by definitions for tools that the agent doesn't use.
- Scale to many tools with tool searchAnthropic
- Connect Claude Code to tools via MCPAnthropic
Added Nov 14, 2026