Tool discovery for AI agents is the process of identifying which external capabilities an agent can use to complete a task. It can involve finding an appropriate API or Model Context Protocol (MCP) server during development, or selecting relevant tools from an approved catalog while the agent is running. See these MCP server use cases for examples of the capabilities a catalog might expose. Once a suitable server has been identified, follow our MCP server setup guide to configure and verify the connection. Our LLM MCP guide explains how hosts, clients and servers exchange capabilities.
For a small agent with three tools, a fixed list may be enough. For an enterprise agent connected to dozens of applications, searching a controlled catalog before loading tool definitions can make the system easier to manage. The right discovery method depends on the size of your tool inventory, the frequency of changes, and your access-control requirements.
What is tool discovery for AI agents?
Tool discovery addresses the question of what capabilities are available and relevant. Tool calling addresses the separate question of how to invoke a specific capability. A discovered tool is not necessarily authorized, configured, or appropriate for the current user.
There are two important layers. At development time, engineers find providers, packages, and servers that expose useful operations. At runtime, the agent or application identifies the approved operations relevant to a particular request. A public directory can help with the first layer, but it should not give an agent unrestricted access to execute unfamiliar tools.
Discovery is one part of AI agent integration. Integration connects the tool to the underlying system, while AI orchestration determines when the tool is needed within the workflow.
Tool discovery methods compared
| Approach | Best fit | Main limitation |
|---|---|---|
| Fixed tool list | Small, stable set of essential operations. | Requires deliberate updates when capabilities change. |
| Dynamic server enumeration | Approved servers with evolving capabilities. | Large inventories can overload the model with irrelevant definitions. |
| Search-based loading | Large catalogs where each task needs only a subset. | Search may miss the correct tool or introduce another decision step. |
| External registry or directory | Finding providers and MCP servers before integration. | Listings require independent evaluation and onboarding. |
A fixed list offers predictable behavior and straightforward regression tests. Dynamic enumeration reduces manual registration work but still requires a filtering policy. Search-based loading limits the number of definitions presented to the model at once. A registry helps discover new services, not establish their trustworthiness.
The AWS guidance on tool discovery distinguishes fixed registration, dynamic enumeration, and search-based selection. In practice, many production systems combine these approaches: essential read-only tools are always available, while specialized operations are retrieved when needed.
Platforms and tools for discovery
The following comparison covers different layers of tool discovery rather than ranking unrelated products. It is based on published documentation, not hands-on benchmarks or claims about which platform is universally best.
| Platform or resource | Discovery capability | Best suited to |
|---|---|---|
| Official MCP Registry | Catalog and API for finding publicly available MCP servers. | Developers evaluating integrations. |
| OpenAI tool search | Deferred function, namespace and MCP tool loading on supported API configurations. | Teams building agents on compatible OpenAI models. |
| Anthropic Tool Search Tool | Searches declared tool definitions and exposes selected tools on demand. | Claude applications with extensive tool catalogs. |
| AWS MCP discovery guidance | Architecture patterns for selecting and registering MCP tools. | Teams designing discovery for AWS-based agent deployments. |
| Private tool catalog | Custom metadata search and policy-controlled results. | Organizations requiring tenant-specific access and approval. |
Official MCP Registry
The official MCP Registry is a public source of server metadata that developers and compatible discovery services can consult. Start with the MCP Registry announcement to understand its purpose. Check the actual provider, documentation, supported transport, authentication method, and maintenance history before onboarding a server. A registry listing is not a security audit.
OpenAI tool search
OpenAI documents a tool-search feature that can reveal selected definitions during execution. Its hosted approach searches a known inventory; a client-managed search can use application-specific information. Review the official tool-search documentation for compatible models and implementation details.
Anthropic Tool Search Tool
Anthropic’s Messages API supports search over deferred tool definitions. This lets an application keep commonly needed capabilities readily available while loading specialized ones when relevant. Its tool-search documentation explains configuration and platform limitations.
Private catalog
A private catalog can store tool metadata alongside an organization’s own access rules. It may use keyword matching, embeddings, structured filters, or a combination of these. Choose this approach when authorization depends on the current employee, customer account, environment, or contractual restrictions. The additional engineering effort is justified only if simpler discovery cannot meet those needs.
How runtime tool discovery works
For an introductory implementation using a defined function tool, follow our agentic AI tutorial. For communication between independent agents, see AI agent communication.
Consider an internal support agent with approved tools for ticket history, order records, shipping events, and policy documents. A user asks why an order has not arrived. Instead of exposing every tool in the organization, the application filters the catalog to the user’s authorized resources and retrieves the relevant operations.
| Example candidate | Why it matters | Decision |
|---|---|---|
| get_order_status | Directly answers whether the order has shipped. | Expose if customer is authorized. |
| get_shipping_events | Can explain the latest delivery exception. | Expose if shipment belongs to the customer. |
| issue_refund | Changes financial records. | Do not expose for this read-only task. |
| search_hr_records | Unrelated and sensitive. | Exclude. |
If the first result is inconclusive, an agentic workflow may request another relevant tool. If no permitted source can resolve the issue, the workflow should escalate rather than invent a delivery date or seek unauthorized access.
How to design a discovery system
- Inventory approved capabilities. Identify tool owners, supported operations, input schemas, required credentials, and side effects.
- Separate onboarding from execution. Review and approve new providers before registering them for production use. Do not automatically install arbitrary search results.
- Write clear metadata. Describe each operation, suitable requests, required parameters, limitations, and whether it reads or modifies data. See our AI agent prompts guide for examples of tool-use instructions.
- Filter before ranking. Apply identity, environment and policy restrictions first. Rank the remaining candidates by relevance.
- Load a manageable subset. Start with the smallest useful candidate set and provide a controlled way to search again when it is insufficient.
- Validate at execution time. Confirm permissions, arguments, and business rules independently. Discovery is not an authorization grant.
- Maintain the catalog. Version tool definitions, monitor failures, retire obsolete operations, and review newly discovered capabilities before activation.
For MCP integrations, the client can request the tools exposed by an approved server using its supported tool-listing capability. Check the negotiated protocol and SDK behavior when deciding how to refresh cached definitions. This is different from searching the public registry for an unfamiliar server.
When several tools have similar names, make their scope and side effects explicit. For example, distinguish a customer-visible order lookup from an internal warehouse lookup, even if both accept an order ID. Use structured metadata for the application, resource type, operation, and permission requirements. A search service can combine exact terms with semantic matching, but it should never allow relevance scores to override access policy.
Cache retrieved definitions only within an appropriate identity and policy scope. Refresh them when permissions, schemas or the approved inventory change; do not assume a previously retrieved tool remains available. Measure retrieval latency and cache hit rates alongside task accuracy, and recheck permissions before execution.
How to evaluate tool discovery
Evaluate discovery independently from overall task completion. A useful system retrieves the right tools, omits unrelated or unauthorized ones, and exposes enough information for the model to use the chosen operation correctly.
| Metric | What it measures |
|---|---|
| Relevant-tool recall | Whether the tools required for a representative task appear in the retrieved candidates. |
| Candidate precision | The proportion of retrieved candidates that are appropriate for the task. |
| Unauthorized exposure rate | Whether the search layer reveals tools the user must not access. |
| Correct tool execution rate | Whether selected operations are invoked with valid inputs. |
| Task completion, cost and latency | The end-to-end impact, including additional searches, retries and reviews. |
For a hypothetical comparison, assume 80 definitions average 300 tokens each. Loading all of them would consume roughly 24,000 definition tokens. Loading six would use about 1,800 definition tokens, before the search interface, metadata and other prompt content. Actual token usage depends on the provider, schemas, caching and repeated discovery calls; this is an illustrative calculation, not a measured saving.
Test common requests, ambiguous wording, similar tool names, unavailable providers, changed schemas, and users with different permissions. Compare search-based loading against a simpler fixed-list baseline. If a small approved set consistently works, an additional discovery service may not be worth its latency or maintenance cost.
Security and common mistakes
An agent must not treat tool descriptions, registry entries, or returned content as trusted instructions. A malicious or misleading description can attempt to influence tool selection or request access to sensitive records. Review providers and definitions independently and enforce security outside the model.
- Do not expose unrestricted credentials in tool definitions or model-visible responses.
- Require review before a newly discovered server or changed capability becomes executable.
- Use narrowly scoped credentials, validate resource ownership and reject unexpected inputs.
- Keep financial transactions, deletions and other consequential operations behind independent authorization and appropriate approval.
- Redact sensitive information from discovery logs and define a retention policy.
- Monitor catalog freshness, denied actions, and repeated search failures.
A discovery layer should fail safely if the catalog is unavailable. An agent can still use approved fixed tools if its policy allows, or report that it cannot complete the request. For business-specific examples of supervised deployment, see our guide to AI agents for business automation.
Frequently asked questions
Is tool discovery the same as function calling?
No. Discovery identifies relevant capabilities and makes their definitions available. Function calling requests execution of a specific operation using structured arguments.
Does MCP automatically discover every available tool?
No. MCP supports discovering capabilities exposed by connected servers. Finding, configuring, trusting, and authorizing external servers requires additional application or administrative processes.
What is the best tool discovery platform for AI agents?
The answer depends on whether you need a public server directory, runtime selection inside a model provider, or a private enterprise catalog. Compare access controls, compatibility, retrieval quality, and total operating cost.
Do small AI agents need tool discovery?
Not always. If an agent uses a handful of stable tools, explicitly registering those tools is often easier to operate and test.
Can tool discovery reduce AI costs?
It may reduce the context occupied by unused definitions. Measure actual billed token usage, caching behavior, extra search requests, latency, and successful task completion before concluding that it saves money.
Explore our MCP and tool use guides for related resources.

