Dumping every MCP tool schema every turn is a harness bug

Reddit r/AI_Agents News

Summary

文章讨论了在每个回合中把所有 MCP 工具 schema 塞进上下文是一种 harness 缺陷,会导致选错工具和 token 浪费;业界正在收敛到渐进式发现(progressive discovery)方案,如 Claude Code 的 MCP Tool Search 和 OpenAI 的延迟加载工具搜索,可减少 85% 以上的工具定义开销。

A pattern that keeps showing up in agent threads and harness writeups: the model picks the wrong tool, or says "I don't have access to X" while X is sitting in the catalog, and the model gets blamed. More often it's the harness: every turn stuffed with every schema from every server. That's thousands of tokens before the user types a word, similar tools colliding (book vs reschedule), and if you just hide tools to save context, the agent finds step 1 and dead-ends because it never learned step 2 existed. The fix that's converging is progressive discovery: give the model a small search tool plus a list of deferred tool names, then load full schemas only when the conversation needs them. Append what gets discovered rather than reordering the tool list, otherwise you bust provider prompt caches. Claude Code's MCP Tool Search ships this in-product (on by default, loads up to five tools per search), and OpenAI's tool search with deferred loading is the same idea. Anthropic's docs put the saving at over 85% of tool-definition overhead, and their engineering post gives an example of roughly 77K tokens dropping to about 8.7K before any work starts. Selection accuracy also drops once you push past roughly 30–50 available tools. Measuring it is cheap: count tokens once with your tool definitions and once without. The difference is the per-session tax, and it's usually concentrated in one or two tools with big nested schemas. Fix those descriptions before adding more infrastructure. Two gotchas worth knowing in Claude Code specifically. Tool search turns itself off when ANTHROPIC_BASE_URL points at a non-first-party proxy (most don't forward the tool_reference blocks), so people behind a gateway quietly get everything upfront. And in sessions with the HIPAA configuration it's hard-off, and ENABLE_TOOL_SEARCH won't turn it back on, so plan allowlists there, not search. Open question: how are you keeping MCP tool surface small without the agent inventing "I don't have that tool"? Tool search, skills-as-gates, per-subagent allowlists, something else?
Original Article

Similar Articles

Million-dollar problem in its own way.

Reddit r/AI_Agents

Ogcode 的团队分享了其用户数据洞察:开发者安装大量 skills 和 MCP 工具导致 agent 选错工具并浪费高达 77% 的 token,他们正在研发能按需动态选择工具的解决方案,并向社区征集思路。

How to check how much context your MCP tools use before the first message

Reddit r/AI_Agents

讨论指出 MCP 工具定义会占用大量常驻上下文——有用户卸载一个大型 MCP server 后上下文从约 200K 降至约 10K tokens。文章提供了如何在首次对话前检查工具开销的实用建议,包括检查请求日志、按需禁用 server 及使用延迟加载。