tool search
A tool retrieval mechanism proposed by Anthropic that reduces context token overhead by deferring the loading of tool definitions and retrieving them on demand. It addresses the problem of MCP tool definitions consuming a large amount of context.
Timeline (last 90 days)
The Claude Agent SDK by default uses tool search to lazily load MCP tool schemas, to avoid a large server occupying the context window from the start.
Anthropic recommends addressing the too-many-tools problem by grouping tools by user intent and pairing them with tool search featuring lazy loading, avoiding stuffing all schemas into the context from the start.
Claude Code v2.1.305 fixes the above regression: after detecting that tool search was rejected, it automatically retries the request without that feature.
The Anthropic API's tool search tool marks tools with `defer_loading: true`; the definitions are still transmitted with the tools array, but by default the model sees at most the five tools returned by search each time, which Anthropic says typically reduces definition tokens by more than 85%.
Tool search is typically implemented using vector embedding technology, retrieving the most relevant tools by semantic similarity and injecting them into the context.
All Facts (5)
The Claude Agent SDK by default uses tool search to lazily load MCP tool schemas, to avoid a large server occupying the context window from the start.
50%UnverifiedAnthropic recommends addressing the too-many-tools problem by grouping tools by user intent and pairing them with tool search featuring lazy loading, avoiding stuffing all schemas into the context from the start.
50%UnverifiedClaude Code v2.1.305 fixes the above regression: after detecting that tool search was rejected, it automatically retries the request without that feature.
50%UnverifiedThe Anthropic API's tool search tool marks tools with `defer_loading: true`; the definitions are still transmitted with the tools array, but by default the model sees at most the five tools returned by search each time, which Anthropic says typically reduces definition tokens by more than 85%.
50%UnverifiedTool search is typically implemented using vector embedding technology, retrieving the most relevant tools by semantic similarity and injecting them into the context.
50%