35One agent

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

loadscallsTaskAgentAgentToolTool searchContextTool catalogToolExtra tools
How to read this

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.
GitHubLoading tools on demand with tool search
Claude’s ability to pick the right tool degrades once you exceed 30–50 available tools.
AnthropicTool search tool

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.
AnthropicTool search tool
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.
OpenAITool search
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.
GitHubLoading tools on demand with tool search

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.
AnthropicConnect Claude Code to tools via MCP

GitHub Copilot CLI

Tool search keeps your context small by letting Copilot CLI load external tools only when a task needs them.
GitHubLoading tools on demand with tool search

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.
AnthropicScale to many tools with tool search
We considered a tool search approach, but that would scatter tools across a flat index.
CursorDynamic context discoveryJan 6, 2026
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.
GitHubLoading tools on demand with tool search

Sources

  1. Dynamic context discoveryJediah Katz, Cursor, Jan 6, 2026
  2. Tool search toolAnthropic
  3. Connect Claude Code to tools via MCPAnthropic

Added Nov 14, 2026