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: true flag 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

  1. Configure multiple MCP servers in ~/.claude.json (total ~70k tokens)
  2. Start Claude Code normally: claude
  3. Run /context to check token usage
  4. 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: true flag 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

  1. Is ENABLE_TOOL_SEARCH=true supposed to be required, or should it activate automatically based on the 10% threshold?
  2. What is the purpose of tengu_mcp_tool_search flag if it doesn't enable the feature?
  3. Should this be documented more prominently?

Thank you!

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗