Tool search for AI agents: load the capability you need

An assistant connected to several services can have a much larger tool catalog than any one request needs. A request to find an issue, for example, should not require the model to read the definitions for every unrelated capability.
Tool search adds a discovery step: find relevant tools, load their definitions, then call them. Anthropic's advanced-tool-use announcement, published on November 24, 2025, introduced this alongside two separate features, Programmatic Tool Calling and Tool Use Examples. This article focuses on search. Its usefulness depends on how much catalog context it avoids and whether the extra step is worth the time.
Deferral changes context, not the request payload
The first distinction is easy to miss. In the direct Messages API, deferred tools still belong in the request. According to the tool search documentation, the developer supplies the search tool and the tool definitions, marking tools intended for later discovery with defer_loading: true.
That setting changes when a definition enters the model's context. It does not remove the definition from the top-level tools parameter. Sending the catalog to the API and showing the entire catalog to the model are different operations.
A library catalog is a useful analogy: you can locate a relevant book without putting every book on the reader's desk. The analogy stops there; the API still needs the underlying definitions in the request.

For an integration, this means deferral should be understood as a context-loading choice. Do not treat it as a reason to omit the catalog from the API request, or assume it solves request-payload size simply because fewer definitions appear in context.
Search finds definitions before execution
Anthropic documents two built-in search variants: regex and BM25. The regex variant accepts Python regex patterns; BM25 accepts natural-language queries. Both search tool metadata, including names, descriptions, argument names, and argument descriptions, as explained in the API documentation.
A search returns tool_reference blocks, which the API expands into full tool definitions. By default, a search returns up to five matching tools. Those results give the model definitions it can use for a subsequent call; they are not the results of executing those tools.
Consider a hypothetical developer assistant asked to find an issue. It could first discover an issue-search tool, receive that tool's definition, and then make the ordinary call with the required arguments. For a discovered client tool, the application still executes the call and returns a tool_result.

Keeping these steps separate makes the mechanism easier to reason about. Discovery answers which capability might fit. Execution performs the requested operation. Tool search is not code execution, and finding a plausible tool does not establish that its arguments are correct or that the requested action is authorized.
A small always-loaded set can still make sense
Deferring the whole working catalog is not the only design. Anthropic's API guidance recommends keeping the three to five most frequently used tools non-deferred. The search tool itself must not be deferred; the documentation says making every tool deferred causes a 400 error.
The suggested size is a starting point, not a universal optimum. A tool that appears in most requests is a reasonable candidate to keep available immediately. A specialized capability used occasionally is a more plausible candidate for discovery.
For the hypothetical issue assistant, issue search might belong in the always-loaded set if finding issues is its main job. If the assistant handles many unrelated tasks and issue lookup is uncommon, deferring that capability could be more appropriate. The same tool can belong in different groups depending on the workload.
This decision should follow representative requests rather than the number of connected services alone. A large catalog does not mean every request needs discovery, and a small catalog does not automatically justify adding a search step.
Discovery has a latency cost
The Agent SDK documentation explicitly identifies an extra round-trip for each tool search. It also says loading everything upfront is typically faster for fewer than roughly ten tools when their definitions fit comfortably in context.
That is SDK guidance, not a rule for every direct API integration or deployment. It does, however, give engineers a concrete reason to avoid assuming deferred loading is always faster. Less catalog content and fewer execution steps are different objectives.

A request that needs a deferred capability must first find it. If the capability was already predictable, that discovery step may be unnecessary overhead. If the request could need one of many specialized tools, selecting a small relevant set may be worth the extra interaction. Neither outcome follows from catalog size alone.
The practical comparison is total task time alongside whether the assistant completed the task correctly. A smaller initial context is useful information, but it is not a complete performance result.
Tool descriptions become part of discovery
When search depends on metadata, descriptions have another job: helping the right capability appear in the results. Anthropic recommends descriptive tool names, service or resource prefixes, task-relevant keywords, and monitoring which tools are discovered.
A useful review question is whether the metadata expresses the task a user would ask for. For the issue-search example, inspect whether the name and description clearly identify the resource and the operation. An argument description should explain what that argument means, rather than merely repeating its name.
These are vendor recommendations, not measured improvements from tests performed for this article. They suggest where to look when discovery misses an expected tool, without proving that a particular naming convention will fix the miss.
Custom search is also supported. The API documentation describes returning tool_reference blocks through a standard client tool_result, including for implementations using embeddings. Each referenced tool must still have a corresponding definition in the top-level tools parameter. Changing the search method does not remove that requirement.
Compare workflows before expanding deferral
A reasonable evaluation would compare a small always-loaded set with a version that defers specialized capabilities. Use requests that reflect the assistant's intended work, including requests for less common tools.
Inspect failed searches and irrelevant matches, then check total task time and correctness after execution. Keep the discovery outcome separate from the tool-call outcome: a relevant search result can still lead to a bad call, while an undiscovered tool cannot help complete the task.
The sources here document Anthropic's interface and recommendations; they are not independent evidence of performance. Before adopting deferred discovery broadly, keep common tools immediately available and test whether searching for the rest improves your actual workflow enough to justify the extra step.
Sources
- Introducing advanced tool use on the Claude Developer Platform · Anthropic
- Tool search tool · Anthropic, Claude Platform Docs
- Scale to many tools with tool search · Anthropic, Claude Agent SDK Docs

