Tool Search doesn't activate automatically despite tengu_mcp_tool_search flag - requires ENABLE_TOOL_SEARCH env var
Resolved 💬 3 comments Opened Jan 15, 2026 by DavidAGRG Closed Jan 15, 2026
Description
Tool Search for MCPs doesn't activate automatically even when:
- MCP tools consume >35% of context (~70k tokens)
- The
tengu_mcp_tool_search: trueflag is present in~/.claude.json
The feature only works when explicitly setting ENABLE_TOOL_SEARCH=true environment variable.
Environment
- Claude Code version: 2.1.7
- Model: claude-opus-4-5-20251101
- Platform: macOS Darwin 25.2.0
- MCPs configured: 8 servers (gmail, google-calendar, google-drive, notion, notion-joy, context7, playwright, claude-in-chrome)
Steps to Reproduce
- Configure multiple MCP servers in
~/.claude.json(total ~70k tokens) - Start Claude Code normally:
claude - Run
/contextto check token usage - Observe: MCP tools show ~70k tokens (35%+ of context), NOT "loaded on-demand"
Expected Behavior
According to the official announcement, Tool Search should activate automatically when MCP tool descriptions exceed 10% of context:
"Claude Code detects when your MCP tool descriptions would use more than 10% of context. When triggered, tools are loaded via search instead of preloaded."
Actual Behavior
- MCP tools are fully loaded into context (~70k tokens)
- Tool Search doesn't activate despite being well above the 10% threshold
- The
tengu_mcp_tool_search: trueflag in config has no effect
Workaround
Explicitly set the environment variable:
ENABLE_TOOL_SEARCH=true claude
Or add to ~/.zshrc:
export ENABLE_TOOL_SEARCH=true
Results After Workaround
| Metric | Without env var | With ENABLE_TOOL_SEARCH=true |
|--------|-----------------|------------------------------|
| MCP tools | 70.5k tokens (35.3%) | 0 tokens (on-demand) |
| Total initial | 98k tokens (49%) | 23k tokens (11%) |
| Free space | 57k tokens | 132k tokens |
Questions
- Is
ENABLE_TOOL_SEARCH=truesupposed to be required, or should it activate automatically based on the 10% threshold? - What is the purpose of
tengu_mcp_tool_searchflag if it doesn't enable the feature? - Should this be documented more prominently?
Thank you!
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗