[FEATURE] Configurable toolSearchThreshold for MCP Tool Search

Resolved 💬 2 comments Opened Jan 15, 2026 by otonashi-labs Closed Feb 27, 2026

Summary

Allow users to configure the threshold at which MCP Tool Search activates, rather than using the hardcoded 10% of context window.

Motivation

Currently, MCP Tool Search only triggers when MCP tool descriptions exceed 10% of context. For users who want to minimize context usage even at lower thresholds (e.g., 4-5%), there's no way to opt-in to lazy loading earlier.

My current setup:

  • 19 MCP tools across 5 servers
  • ~9.3k tokens (4.7% of context)
  • Would prefer lazy loading to save those tokens for actual work

Proposed Solution

Add a toolSearchThreshold setting in settings.json:

{
  "toolSearchThreshold": 0.05
}

Where 0.05 = 5% of context window. Setting it to 0 could mean "always use Tool Search for MCP tools."

Alternatives Considered

  1. Disabling MCP servers — works but loses functionality
  2. Waiting for 10% threshold — requires adding more servers, counterproductive
  3. Current behavior — acceptable but suboptimal for context-conscious users

Additional Context

  • Tool Search was released in 2.1.7 with the 10% threshold hardcoded
  • Related issues: #11364, #12836 (lazy loading requests)
  • The infrastructure already exists — this is just exposing a config knob

View original on GitHub ↗

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