Cut, merge or defer an agent's tools
Judge an agent's tool set against the tasks it serves, and decide which tools to remove, merge or load on demand, with the cost each one adds.
Scenario
A logistics company's dispatch agent started with six tools. A year later it has 48, from four MCP servers, because every team that connected a system "might need it someday".
Nobody removed anything. Now the agent sometimes calls a payroll tool when a dispatcher asks about a driver's hours, and every request pays for definitions it never uses.
Explanation
Every tool you give an agent costs something, even when it is never called.
| Cost | Why |
|---|---|
| Context | Each loaded tool definition is input tokens on every request. The tool search docs give a typical five-server MCP setup as able to use about 55,000 tokens of definitions before Claude does any work |
| Selection accuracy | The same docs note that Claude's ability to pick the right tool degrades once more than about 30-50 tools are available at once. Overlapping or vaguely described tools make it worse at any count |
| Attack surface | A write, delete or outbound tool the role never needs is still a path for a prompt injection or a model error. Least privilege means the tool isn't there |
For each tool, ask three questions in order:
- Does this role ever need it? If not, remove it. A deferred tool is still callable once Claude finds it, so deferring is not a substitute for removing. The evidence is what the agent actually calls over representative traffic, not what someone says it might need. On the MCP connector, an allowlist (
enabled: falseby default, then enable named tools) keeps new server tools from appearing unreviewed. - Does it overlap with another tool, or always run chained with others? Then merge. Anthropic's tool-writing guidance prefers a few thoughtful tools:
schedule_eventinstead oflist_users,list_eventsandcreate_event; oneget_customer_contextinstead of three lookups. Namespace what remains by service or resource (fleet_,tms_) so the boundaries are clear. - Is it needed, but only for some requests? Then defer it. With the tool search tool, you send every definition but mark most
defer_loading: true; Claude searches the catalog and loads only the few it needs. Keep the 3-5 most frequently used tools loaded so Claude can call them without searching.
The docs suggest tool search when you have 10 or more tools, definitions over about 10,000 tokens, or a library that keeps growing. With fewer than 10 tools, or tools that every request uses, standard tool calling is the better fit (check the current docs for these thresholds).
Worked example
The dispatch agent's review, tool group by tool group:
| Group | Finding | Decision |
|---|---|---|
| HR server (9 tools: payroll, leave, contracts) | Never called by dispatch in 90 days of traces | Remove the server |
| Slack (11 tools, including channel deletion) | Dispatch only posts updates to drivers | Remove all but slack_post_message |
get_shipment, find_shipment, shipment_lookup |
Three teams built the same lookup; Claude alternates between them | Merge into tms_shipment_search |
| Driver, hours and location lookups (3 tools) | Always called together | Merge into fleet_driver_status |
| Fleet admin and billing exports (14 tools) | No dispatch calls in 90 days | Remove |
| Customs documents (8 tools) | Needed on about 1 request in 20 | Defer |
The deferred tools stay in the request, marked like this:
{
"name": "customs_get_declaration",
"description": "Get a customs declaration by shipment.",
"input_schema": {
"type": "object",
"properties": {
"shipment_id": { "type": "string" }
},
"required": ["shipment_id"]
},
"defer_loading": true
}
Result: from 48 tools to 3 always-loaded tools, the tool search tool and 8 deferred customs tools. Each decision names the cost it removes: the HR and Slack cuts remove attack surface, the merges remove selection errors, the deferral removes context.