Capability Bloat Evaluation
The problem
- Context bloat: a typical multi-server setup (GitHub, Slack, Sentry, Grafana, Splunk) can consume about 55k tokens of tool definitions before any work starts.
- Selection accuracy degrades once you exceed roughly 30 to 50 available tools.
- Tool definitions and accumulated
tool_resultblocks both consume the window.
Four approaches (verified: "Manage tool context")
| Approach | Reduces | Fits |
|---|---|---|
| Tool search | Tool definitions loaded up front | Large toolsets (20+) where most are not needed every turn |
| Programmatic tool calling | tool_result round trips | Chains of calls that can run as one script |
| Prompt caching | Cost of repeated tool definitions | Stable toolsets across many requests |
| Context editing | Old tool_result blocks in history | Long agent loops |
Tool search details: include a tool search tool, set defer_loading: true on tools that should not load up front (at least one tool stays non-deferred), and Claude loads matching tools on demand (up to 5 by default). It typically cuts definition tokens by over 85% and keeps selection accurate across hundreds or thousands of tools. In Claude Code, MCP tool search is on by default. Prompt caching does not shrink context; it lowers its price.
Evaluating capability bloat (design guidance)
Treat the capability surface as a budget and audit it:
- Inventory: every tool, MCP server, skill, hook and rule file the agent can reach.
- Measure usage: how often each tool is called, success rate, tokens consumed by its definition and its outputs.
- Find overlap: tools with near-identical descriptions cause misrouting (2.1).
- Prune or consolidate: merge related tools into one with an
action; remove unused servers. - Defer or scope: defer rarely used tools; give each agent or subagent a small relevant set (2.3).
- Re-test selection accuracy and task success after each change (D4.1).
Other bloat sources: oversized CLAUDE.md (keep under about 200 lines; move procedures into skills, whose bodies load only on use), duplicated instructions, verbose tool output.
Exam traps
- Adding capabilities "just in case".
- Fixing misrouting with a longer prompt instead of pruning tools.
- Loading all MCP servers for every task.
- Not measuring selection accuracy before and after.
- Disabling tool search with a large toolset.
References
- Tool search tool — checked Oct 16, 2026
- Manage tool context — checked Oct 16, 2026
- MCP in Claude Code — checked Oct 16, 2026
Check your understanding
60 tools across five servers and the agent picks wrongly. Fix?Show answerHide answer
Answer
Tool search or per-agent scoping, plus consolidating overlapping tools.Does prompt caching reduce context size?Show answerHide answer
Answer
No; it reduces what you pay for repeated tokens.First step of a capability audit?Show answerHide answer
Answer
Inventory and measure actual usage and token cost.