passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 032/032 easy

A team's agent has grown to use MCP servers for GitHub, Slack, Sentry, Grafana, and Splunk, and now has well over a hundred available tool definitions. They notice two problems: the tool definitions alone are consuming tens of thousands of tokens of context before the agent does any actual work, and the agent has started picking the wrong tool more often than it used to. Enabling Claude's tool search tool and marking most of those tool definitions with `defer_loading: true` is meant to address this by doing what?

  1. Deleting the unused tool definitions from the request entirely, so the calling application no longer needs to send their schemas to the API at all on any request
  2. Keeping only a small non-deferred set of tools (and the tool search tool itself) loaded into context up front, while the rest stay out of context until Claude searches the catalog by name, description, or argument details and the API expands only the matching tools it finds -- cutting the upfront token cost and keeping tool-selection accuracy high even as the total catalog grows into the hundreds or thousands
  3. Forcing Claude to call every deferred tool once, in sequence, at the start of each conversation, so that all of them become available for the rest of the session
  4. Merging all the deferred tools from every MCP server into a single combined tool with one shared schema, so there is only ever one tool definition to select from
Next card → Shuffle