Ado· @adocomplete · X·精选AI 评分68
Claude Code 用 tool_search_tool_bm25 将多 server MCP 定义开销削减 85% 以上
AI 导读
Ado Kukic 介绍 Claude 上下文管理的两行改动:添加 tool_search_tool_bm25_20251119(自然语言查询)或其 regex 变体,并对很少用的工具设置 defer_loading: true。
推荐理由
原文给出两行配置的具体做法和 token 节省数字,读者可直接迁移到自己的多 server MCP 场景。
正文 · 原文
Two lines of change: add tool_search_tool_bm25_20251119 (plain language queries) or the regex variant, then set defer_loading: true on everything you rarely use.
Claude's context starts with just the search tool. It searches names, descriptions and argument names, and the API expands up to 5 matches in place by default. Per the docs, a typical five server MCP setup burns about 55k tokens on definitions before any work, and search usually cuts that by over 85 percent. Selection stays sharp too, since accuracy drops past 30 to 50 loaded tools.
来源:Ado · x.com