Summary
Add support for the Tool Search Tool beta feature to enable deferred tool loading and significantly reduce token consumption.
Problem
Currently, all tools (SDK + MCP) are loaded into context at session start. In my project, this consumes ~15,000-20,000 tokens for tool definitions alone, even when most tools aren't needed for the current query.
My current setup:
- 12 SDK tools: ~6,000 tokens
- 8 MCP tools (Google Workspace): ~5,285 tokens
- Total tools overhead: ~11,000+ tokens per request
Proposed Solution
Support the defer_loading: true option and Tool Search Tool as documented at:
https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
This would require:
-
Beta header support in SDK options:
advanced-tool-use-2025-11-20
mcp-client-2025-11-20
-
Option to pass defer_loading config for individual tools or as default
-
Support for mcp_toolset with default_config for MCP servers:
{
type: "mcp_toolset",
mcp_server_name: "my-server",
default_config: {
defer_loading: true
},
configs: {
"frequently_used_tool": { defer_loading: false }
}
}
Expected Benefit
According to Anthropic's documentation:
- Up to 85% reduction in tool token usage
- Improved accuracy on tool selection with large tool libraries (Opus 4.5: 79.5% → 88.1%)
Workaround
Currently the only workaround is to manually reduce the number of tools configured, which limits functionality.
Related
Summary
Add support for the Tool Search Tool beta feature to enable deferred tool loading and significantly reduce token consumption.
Problem
Currently, all tools (SDK + MCP) are loaded into context at session start. In my project, this consumes ~15,000-20,000 tokens for tool definitions alone, even when most tools aren't needed for the current query.
My current setup:
Proposed Solution
Support the
defer_loading: trueoption and Tool Search Tool as documented at:https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
This would require:
Beta header support in SDK options:
advanced-tool-use-2025-11-20mcp-client-2025-11-20Option to pass
defer_loadingconfig for individual tools or as defaultSupport for
mcp_toolsetwithdefault_configfor MCP servers:Expected Benefit
According to Anthropic's documentation:
Workaround
Currently the only workaround is to manually reduce the number of tools configured, which limits functionality.
Related
ENABLE_TOOL_SEARCHsetting that enables this feature