Claude Code Adds Tool Search to Cut MCP Context Load

Claude Code now uses on-demand Tool Search to avoid preloading large MCP tool descriptions, freeing context for prompts and reasoning. Server authors should condense instructions; client authors must add ToolSearchTool to enable lazy search-driven loading.

Claude Code Adds Tool Search to Cut MCP Context Load

TL;DR

  • Trigger: Claude Code monitors MCP tool descriptions and runs Tool Search when those descriptions would occupy more than 10% of the context window.
  • Tools are loaded via search rather than preloaded, preserving the main context window for prompts and model reasoning.
  • Reduces wasted context in large MCP setups; user reports included configurations consuming tens of thousands of tokens (one cited 67k+ tokens).
  • Server instructions field becomes more consequential; concise, targeted instructions improve on-demand discovery.
  • Client change: Client implementations should expose a ToolSearchTool so Claude Code can query available tools dynamically; documentation for the tool exists.
  • Change preserves existing tool semantics while shifting to a search-driven, lazy-loading model to address excessive context consumption.

MCP Tool Search for Claude Code introduces a mechanism that reduces the context burden of large MCP servers by loading tools on demand. The change targets setups where MCP servers expose many tools—sometimes dozens—that otherwise consume large amounts of context before any reasoning begins.

How it works

  • Claude Code monitors MCP tool descriptions and triggers Tool Search when those descriptions would occupy more than 10% of context.
  • When that threshold is reached, tools are loaded via search rather than preloaded into the session, preserving the main context window for prompts and other crucial information.
  • In other respects, MCP tools continue to function as before.

Why it matters

Large MCP installations were increasingly common; examples documented by users included configurations with seven or more servers consuming tens of thousands of tokens (one report cited 67k+ tokens). The new Tool Search capability implements lazy loading for MCP servers, reducing wasted context and making more room for model reasoning and other inputs.

Implications for MCP server authors

The server instructions field gains practical importance. With Tool Search enabled, clearer server instructions help Claude determine when a search for a tool is appropriate—similar to how skills are discovered and invoked. Maintaining concise, targeted instructions will improve the likelihood that relevant tools are found only when needed.

Implications for MCP client authors

Client implementations should expose a ToolSearchTool to allow Claude Code to query available tools dynamically. Documentation for that tool exists and should be consulted to align client behavior with Claude Code’s search-driven loading. Implementing ToolSearchTool will enable clients to participate in the on-demand loading flow rather than relying on full preloading of all tools.

Context

This update addresses a common pain point in multi-server MCP deployments: excessive context consumption from large tool lists. By shifting to a search-driven loading model when descriptions consume a nontrivial portion of the context window, Claude Code aims to make extensive MCP setups more practical without changing the underlying tool semantics.

Original source: https://x.com/i/status/2011523109871108570

Continue the conversation on Slack

Did this article spark your interest? Join our community of experts and enthusiasts to dive deeper, ask questions, and share your ideas.

Join our community