Data as of Aug 25, 2026 · Based on 324 AI responses from ChatGPT Search and Google AI Mode · See how Parse measures this
To build a system where AI agents can discover and use new tools, the Model Context Protocol (MCP) is the recommended standard. It allows agents to query servers for available tools in real time. For implementation, developers frequently pair MCP with orchestration frameworks like LangGraph, the Microsoft Agent Framework, or the
Claude Agent SDK, which leverage the protocol to provide enterprise-ready connectivity and streamlined tool management.
Brands AI recommends here
Named in 54% of answers
Named in 53% of answers
MCP is the primary standard for dynamic tool discovery, enabling agents to interoperate with external servers and data without needing to rebuild components when tools are added or changed.
Named in 38% of answers
Named in 33% of answers
When building systems where agents dynamically discover and use new tools (avoiding context window bloat and scaling past hundreds of tools), there isn't just one "framework," but rather a **modern architectural pattern combined with specific orchestration tools**. The gold standard pattern for this is **Progressive…
When building systems where agents dynamically discover and use new tools (avoiding context window bloat and scaling past hundreds of tools), there isn't just one "framework," but rather a modern architectural pattern combined with specific orchestration tools.
The gold standard pattern for this is Progressive Disclosure / Dynamic Tool Selection (the "Discovery First, Injection Second" approach pioneered by Anthropic's Tool Search and advanced patterns in LangGraph).
Top Frameworks & Approaches for Dynamic Tool Discovery
- **Why it fits:** Unlike static agent runners, LangGraph allows you to manipulate state and runtime context dynamically. You can build a custom `ToolNode` or use runtime configuration/state injections to filter, search, and bind a subset of tools to the model per-step based on the user's immediate intent.
- **Best for:** Complex, production-grade agent loops where you need programmatic control over what the LLM can "see" at any given turn.[](https://google.com/goto?url=CAESTgHrOzAVjSfwzr8ETjjVPGGQk62iTZJ4-WohKT3ro92gKnqD5t1cNjBLUzgA-nZgd_LF8Jz1FZ_OfHvLF7OOoPrOelLYQyP3wAORE3F6HA) [[1]](https://google.com/goto?url=CAESTgHrOzAVjSfwzr8ETjjVPGGQk62iTZJ4-WohKT3ro92gKnqD5t1cNjBLUzgA-nZgd_LF8Jz1FZ_OfHvLF7OOoPrOelLYQyP3wAORE3F6HA)
- **Why it fits:** MCP standardizes how applications provide context and tools to LLMs. Instead of hardcoding tools into your agent framework, MCP allows agents to connect to external "servers" that dynamically expose or register tools at runtime. Combined with a gateway or search primitive, an agent can query an MCP registry to discover new capabilities on the fly.
- **Best for:** Decoupled, microservice-style tool ecosystems where tools live outside your core application codebase.[](https://google.com/goto?url=CAESfgHrOzAVDzPqaNrE53FtBJHhc2ZKSGF0Ux0N5LIW_3114u3sb3iGh14nr1bL1gxeQEPhTZ0WoXMmmO1-IKt4mPSagw8F6jwQD1FcHb81y-d_OmW0LQPauOm09ZVg7ZMTk_CG0OV8--oDgCgpAVAnHBM5-b2xKt0xNYD3LJJpLg) [[1]](https://google.com/goto?url=CAESfgHrOzAVDzPqaNrE53FtBJHhc2ZKSGF0Ux0N5LIW_3114u3sb3iGh14nr1bL1gxeQEPhTZ0WoXMmmO1-IKt4mPSagw8F6jwQD1FcHb81y-d_OmW0LQPauOm09ZVg7ZMTk_CG0OV8--oDgCgpAVAnHBM5-b2xKt0xNYD3LJJpLg)
- **Why it fits:** If you have hundreds or thousands of tools, putting all their descriptions in a prompt breaks context limits. Instead, you store tool descriptions and schemas in a vector database. When a user sends a prompt, you run a fast semantic search against the tool registry, retrieve the top K cap K𝐾 relevant tool definitions, and bind *only* those to the LLM for that execution step.
- **Best for:** Massive scale tool libraries where keyword or LLM-based tool searching is too slow or expensive.
The Blueprint: How to Implement Dynamic Tool Discovery
Regardless of the framework you choose, the architecture typically follows a three-step Discovery Loop:
To help narrow down the best choice for your stack, could you share:
If the goal is **agents that can discover tools at runtime rather than having every tool hard-coded into the agent**, I’d use **Model Context Protocol (MCP)** as the foundation, with a **semantic/hybrid tool-discovery layer on top**. ### My recommendation **MCP + tool registry + semantic retrieval + policy layer**
If the goal is agents that can discover tools at runtime rather than having every tool hard-coded into the agent, I’d use Model Context Protocol (MCP) as the foundation, with a semantic/hybrid tool-discovery layer on top.
MCP + tool registry + semantic retrieval + policy layer
MCP is currently the strongest choice for the protocol layer because it standardizes how agents discover and invoke external tools. The latest MCP specification supports tools/list, pagination, caching, deterministic tool ordering, and server discovery.
The important distinction is:
Don't dynamically load every tool into the model context. Dynamically discover only the tools relevant to the current task. AWS's current guidance explicitly identifies three patterns—static registration, loading all tools dynamically, and runtime search—and recommends filtering/semantic search as tool catalogs grow.
A good architecture looks like:
┌─────────────────────┐
│ Agent/LLM │
└──────────┬──────────┘
│
"I need a tool for X"
│
▼
┌─────────────────────┐
│ Tool Discovery │
│ │
│ BM25 + embeddings │
│ metadata filtering │
│ permissions/policy │
└──────────┬──────────┘
│
top 3–10 tools
│
▼
┌─────────────────────┐
│ MCP Gateway │
└──────────┬──────────┘
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
MCP Server A MCP Server B MCP Server C
Salesforce GitHub Internal APIs
If you have 10–20 tools, simply calling tools/list and giving the results to the model is perfectly reasonable.
But at hundreds or thousands of tools, it becomes problematic. Tool schemas consume context and make tool selection harder. Recent research on semantic MCP discovery reports substantial reductions in tool-context consumption by retrieving only a handful of relevant tools.
So I'd implement two levels:
Then expose the selected tools to the agent.
| Option | Best for | My take |
|---|---|---|
| MCP | Universal tool protocol/discovery | Best foundation |
| OpenAI Agents SDK | Building the agent runtime around MCP | Excellent if you're on OpenAI |
| AWS AgentCore/Strands | AWS-heavy enterprise environments | Strong |
| LangGraph | Complex stateful agent workflows | Good orchestration layer, not the discovery protocol |
| Custom tool registry | Highly specialized environments | Useful behind MCP |
The OpenAI Agents SDK now explicitly incorporates MCP alongside other agent primitives, so it can serve as the orchestration layer while MCP handles external tool integration.
Don't make the LLM responsible for unrestricted discovery.
Give it something conceptually like:
search_tools(query, constraints)
↓
candidate tools
↓
policy / authorization filter
↓
ranked tools
↓
load schema for selected tools
↓
agent calls tool
For ranking, I'd start with:
score =
0.45 * semantic_similarity
+ 0.25 * keyword/BM25_score
+ 0.15 * capability/domain_match
+ 0.10 * historical_success
+ 0.05 * latency/cost_score
And attach metadata to every tool:
{
"name": "create_invoice",
"description": "Create an invoice for an existing customer",
"domain": "billing",
"risk": "financial_write",
"required_scopes": ["invoices.write"],
"cost": "low",
"latency_ms": 250
}
That gives you dynamic discovery without dynamic authorization—the latter should remain deterministic and enforced outside the model.
If I were starting this system today, I'd choose:
MCP for the tool protocol → MCP Registry/internal catalog for discovery → hybrid BM25 + vector retrieval for tool selection → policy engine for authorization → Agents SDK/LangGraph for orchestration.
MCP is particularly attractive now because the July 2026 specification moved to a stateless core and made tool-list results cacheable, which makes large-scale MCP deployments considerably easier to operate.
If you're building this for hundreds/thousands of tools, I would not implement plain tools/list → dump everything into context; I'd build the tool-search layer as a first-class component.
If **dynamic tool discovery** is the core requirement, I’d make **Model Context Protocol (MCP)** the tool layer rather than choosing an agent framework that invents its own discovery mechanism. ### Recommended architecture **MCP + an agent orchestration framework**
If dynamic tool discovery is the core requirement, I’d make Model Context Protocol (MCP) the tool layer rather than choosing an agent framework that invents its own discovery mechanism.
MCP + an agent orchestration framework
MCP explicitly supports tools/list, pagination, tool schemas, and notifications when the tool set changes. The newer 2026 MCP specification also adds server/discover for discovering server capabilities before interacting with it.
There are really two discovery problems:
For example:
┌─────────────────────┐
│ Agent │
│ planner / executor │
└──────────┬──────────┘
│
tool search
│
┌──────────▼──────────┐
│ Tool Registry │
│ │
│ embeddings + │
│ metadata + ACLs │
└──────────┬──────────┘
│
relevant MCP servers
│
┌────────────────┼────────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ MCP │ │ MCP │ │ MCP │
│ Server A│ │ Server B│ │ Server C│
└─────────┘ └─────────┘ └─────────┘
This prevents the classic problem of dumping thousands of tool definitions into the model's context.
If you're using OpenAI models, OpenAI Agents SDK + MCP is particularly attractive because the SDK already supports MCP servers, hosted MCP tools, tool filtering, and dynamic tool filtering. It also supports deferred loading/tool search for hosted MCP servers, which is directly relevant to your dynamic-discovery requirement.
If you need complex stateful workflows, branching, human approval, and durable execution, I'd instead consider LangGraph as the orchestration layer while still using MCP for tools.
For a new system I'd choose:
MCP → tool interoperability OpenAI Agents SDK or LangGraph → agent orchestration Vector/metadata registry → large-scale tool discovery Policy engine → authorization
And I would not make the agent blindly discover and execute arbitrary newly registered tools. Tool descriptions and annotations should be treated as untrusted unless the server is trusted; MCP itself recommends approval/visibility mechanisms for sensitive operations.
The key design pattern is therefore "discover → rank → authorize → load → execute", rather than simply "give the agent all available tools."
If you're building this at 10s vs. 1,000s vs. 100,000s of tools, the optimal discovery architecture changes substantially.
Building a system where agents dynamically discover and use tools requires solving a major bottleneck: **context window bloat** . If you pass hundreds of tool definitions (JSON schemas) to an LLM upfront, accuracy plummets, latency increases, and costs…
Building a system where agents dynamically discover and use tools requires solving a major bottleneck: context window bloat . If you pass hundreds of tool definitions (JSON schemas) to an LLM upfront, accuracy plummets, latency increases, and costs spike.
The industry has largely converged on an architecture of "Discovery First, Injection Second" , supported by a few leading frameworks and protocols.
The Leading Standard: Model Context Protocol (MCP) + Tool Search
The emerging gold standard for dynamic tool discovery is Model Context Protocol (MCP) (originally pioneered by Anthropic) combined with native Tool Search or deferred tool patterns.
Framework Options for Implementation
Recommendation Summary
If you can share how many tools you expect to manage, whether they are internal APIs or third-party integrations , and your preferred LLM provider , I can recommend a more tailored architecture.
The best industry standard and architecture for building a dynamic tool discovery system is the **Model Context Protocol (MCP)** , coupled with either an **agent registry gateway** or **Anthropic's Advanced Tool Use framework** . Rather than using a monolithic agent framework, the modern standard is to separate the…
The best industry standard and architecture for building a dynamic tool discovery system is the Model Context Protocol (MCP) , coupled with either an agent registry gateway or Anthropic's Advanced Tool Use framework . Rather than using a monolithic agent framework, the modern standard is to separate the tool providers from the agent orchestration using an open, protocol-based architecture.
An evaluation of the best approaches for dynamic tool discovery highlights the key options, architectural patterns, and execution strategies available.
The Leading Frameworks & Standards
Developed as an open-source standard, MCP completely decouples tools (servers) from agents (clients).
notifications/tools/list_changed hook. This allows tool servers to broadcast real-time additions, removals, or permission state changes (e.g., hiding a tool if an API key expires) directly to the agent runtime.If you are heavily leveraging Claude or similar state-of-the-art models, Anthropic's Tool Search Tool pattern is the premier framework for context-aware dynamic discovery.
search_available_tools . The agent calls this search tool, finds the top 3–5 exact tools it needs, and uses a second primitive (load_tool ) to dynamically inject the full JSON schema into its active context window on the fly.If you need a programming framework to wire these components together, Pydantic AI and LangGraph are the top choices.
The Recommended Architectural Pattern
To build a production-grade system, combine these technologies into a Gateway Architecture:
[ New Tool / MCP Server ] ──(Auto-Register)──► [ Tool Registry / Vector DB ]
▲
(Semantic Search)
│
[ User Prompt ] ─────────────────────────────► [ Agent Orchestrator ]
Direct Comparison of Approaches
| Approach | Discovery Mechanism | Best For | Pros | Cons |
|---|---|---|---|---|
| MCP + Registry | Open protocol standard; real-time event notifications. | Enterprise, multi-agent systems, cross-language tools. | Language agnostic, live status updates, decoupled architecture. | Requires hosting an intermediary registry gateway. |
| Anthropic Tool Search | Two-step model-driven loop (search then load). | Applications utilizing Claude or advanced frontier LLMs. | Massive token savings, zero context window clutter. | Higher latency due to multi-turn tool search calls. |
| LangGraph / Router Node | Vector DB embedding search at the pre-execution graph stage. | Custom, heavily deterministic programmatic agent workflows. | Absolute state control, excellent debugging and observability. | Code logic scales in complexity as tool count explodes. |
To help narrow down your engineering design, let me know:
For a system where **agents can dynamically discover and use new tools**, the best architecture is usually **not a single agent framework**. The strongest pattern today is: **Model Context Protocol (MCP) for tool discovery + an agent orchestration framework for reasoning/workflows.** MCP is emerging as the…
For a system where agents can dynamically discover and use new tools, the best architecture is usually not a single agent framework. The strongest pattern today is:
Model Context Protocol (MCP) for tool discovery + an agent orchestration framework for reasoning/workflows. MCP is emerging as the interoperability layer that lets agents discover tools exposed by external servers instead of hard-coding every integration.
A practical stack:
| Layer | Recommended choice | Why |
|---|---|---|
| Tool discovery | MCP | Standard protocol for discovering tools, schemas, and capabilities dynamically |
| Tool registry/index | Vector + metadata registry | Avoid dumping hundreds of tools into the context window |
| Agent runtime | LangGraph, Microsoft Agent Framework, or Semantic Kernel | Handles planning, state, retries, workflows |
| Policy layer | Custom permissions/governance | Controls which tools an agent may invoke |
For a greenfield production system:
MCP + LangGraph + semantic tool retrieval
Architecture:
User Request
|
v
Agent Orchestrator
(LangGraph)
|
+-----------+-----------+
| |
v v
Tool Discovery Service Memory/State
|
v
MCP Tool Registry
|
+------+------+------+
| | |
MCP Server MCP MCP
(CRM) (Search) (Code)
Instead of:
Agent context:
- tool1
- tool2
- tool3
...
- tool500
do:
User asks:
"Find unpaid invoices"
|
v
Tool retriever:
returns:
- accounting.search_invoices
- accounting.get_customer_balance
|
v
Agent invokes MCP tool
This avoids context bloat and improves tool selection. Research on semantic MCP tool discovery specifically targets this problem: exposing hundreds of tools directly to an LLM increases token cost and can reduce accuracy, while retrieval-based selection can narrow the active tool set.
1. LangGraph — best general choice
It has a strong ecosystem around tool calling and MCP integrations.
2. Microsoft Agent Framework / Semantic Kernel — best enterprise choice
Semantic Kernel’s plugin model maps naturally to dynamically discovered capabilities, and MCP support makes it suitable for external tool ecosystems.
3. OpenAI Agents SDK — best for simpler agent systems
4. CrewAI — good for role-based multi-agent teams
A common early design mistake:
Every tool → every agent → every prompt
It fails when you reach hundreds of tools because:
So the short answer:
Best framework combination: MCP for dynamic discovery + LangGraph for orchestration + a semantic tool registry for scaling beyond dozens of tools.
If you are building a platform intended to support thousands of tools across many agents, the tool registry/retrieval layer is actually the more important design decision than the agent framework itself.
Building a system where agents dynamically discover and use new tools requires decoupling **tool registration and discovery** from **agent compilation/prompt injection** . Cramming hundreds of tool schemas into an LLM's prompt causes context rot, token waste, and degraded…
Building a system where agents dynamically discover and use new tools requires decoupling tool registration and discovery from agent compilation/prompt injection . Cramming hundreds of tool schemas into an LLM's prompt causes context rot, token waste, and degraded decision-making.
The industry has largely converged on a protocol-plus-registry architecture rather than relying on any single monolithic framework.
The Modern Standard Stack for Dynamic Tool Discovery
search_tools primitive). When faced with a task, the agent queries the tool catalog using natural language/vector embeddings, fetches only the 3 to 5 relevant tool definitions, and injects them into the active context on demand.mcps fields and adapters) if your system relies on multi-agent collaborative teams that need to aggregate tools from various remote servers.Recommended Implementation Blueprint
If you'd like to dive deeper into the implementation, let me know:
I can provide a code snippet tailored to your architecture.
If the core requirement is **“agents should discover tools at runtime rather than having every tool hard-coded into the agent”**, I’d use **MCP (Model Context Protocol)** as the tool-discovery layer, with your agent framework on top of it. ### Recommended architecture **Agent runtime → MCP client → Tool registry / MCP…
If the core requirement is “agents should discover tools at runtime rather than having every tool hard-coded into the agent”, I’d use MCP (Model Context Protocol) as the tool-discovery layer, with your agent framework on top of it.
Agent runtime → MCP client → Tool registry / MCP servers → actual APIs/services
Why MCP:
tools/list. Servers can also signal when their tool catalog changes. I'd separate tool discovery from tool execution:
┌──────────────────┐
│ Agent / LLM │
└────────┬─────────┘
│
"What can I use?"
│
┌────────▼─────────┐
│ Tool Discovery │
│ / MCP Client │
└────────┬─────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ CRM MCP │ │ Git MCP │ │ DB MCP │
│ Server │ │ Server │ │ Server │
└────┬─────┘ └────┬─────┘ └────┬─────┘
▼ ▼ ▼
CRM Git Database
The agent shouldn't need to know that search_customer happens to live in your CRM service. It discovers the capability and its schema, then invokes it.
Don't dump hundreds or thousands of tool schemas into the model's context. That's where deferred tool loading / tool search becomes important.
The current OpenAI Agents SDK supports deferred loading for tools and hosted MCP servers: the model can search for and load only the relevant tool definitions when needed.
So I'd use:
MCP = protocol/discovery layer
Tool registry = governance/catalog layer
Tool search = semantic selection layer
Agent framework = orchestration/execution layer
For example:
Tool Registry
│
┌──────────────┼──────────────┐
│ │ │
metadata auth embeddings
│ │ │
└──────────────┼──────────────┘
│
Tool Search
│
"Find tools for
refunding orders"
│
┌──────────▼──────────┐
│ Relevant MCP tools │
└──────────┬──────────┘
│
Agent chooses
│
▼
MCP tool call
If you're starting today:
| Requirement | Recommendation |
|---|---|
| Tool interoperability | MCP |
| Dynamic discovery | MCP tools/list + catalog |
| Hundreds/thousands of tools | Semantic tool search + deferred loading |
| Permissions | Registry + per-tool authorization |
| Remote tools | MCP Streamable HTTP |
| Agent orchestration | OpenAI Agents SDK or LangGraph |
| Auditing | Central MCP gateway/registry |
| Tool versioning | Registry-managed versions/capabilities |
One particularly useful feature for your use case is that the latest MCP specification has been moving toward a more scalable, stateless protocol core, with cache hints and deterministic tool-list ordering—useful characteristics when you have many agents and many dynamically changing tool servers.
Bottom line: I wouldn't build a proprietary dynamic-tool-discovery protocol unless you have an unusual requirement. MCP + a centralized tool catalog + semantic/deferred tool search is the architecture I'd recommend. It gives you dynamic discovery without coupling your agents to the underlying services.
Building a system for dynamic tool discovery requires solving two primary bottlenecks: **context window bloat** (cramming hundreds of tool schemas into an LLM prompt degrades reasoning) and **governance/security** (controlling who or what can access a tool at…
Building a system for dynamic tool discovery requires solving two primary bottlenecks: context window bloat (cramming hundreds of tool schemas into an LLM prompt degrades reasoning) and governance/security (controlling who or what can access a tool at runtime).
The industry has largely converged on a protocol-plus-registry pattern rather than monolithic code frameworks.
The Leading Standard: Model Context Protocol (MCP)
The gold standard for dynamic tool discovery is Model Context Protocol (MCP) , originally pioneered by Anthropic and rapidly adopted across the broader ecosystem (including Azure AI Agent Service and Spring AI).
Key Architectural Patterns for Implementation
When implementing tool discovery on top of MCP or a custom registry, use one of these three strategies depending on your scale:
search_tools primitive. When a user asks a complex question, the model queries the search tool first, retrieves the specific schemas for the 2–3 relevant functions, and injects only those into its active context window.Frameworks to Build With
ToolSearchToolCallingAdvisor implementations for deferred tool indexing and runtime expansion.To help narrow down the exact architecture you need, tell me:
For a system where agents can **dynamically discover and use new tools**, the strongest current architecture is usually: **Model Context Protocol (MCP) + an agent orchestration framework (LangGraph, Semantic Kernel, etc.) + a tool registry/discovery layer.**…
For a system where agents can dynamically discover and use new tools, the strongest current architecture is usually:
Model Context Protocol (MCP) + an agent orchestration framework (LangGraph, Semantic Kernel, etc.) + a tool registry/discovery layer.
A useful way to think about the stack:
Agent
|
Agent Framework
(LangGraph / Semantic Kernel)
|
Tool Discovery Layer
(registry + semantic search)
|
MCP Servers
|
APIs / Databases / Services
Model Context Protocol is currently the best fit for the "discover tools I don't know about yet" problem.
Why:
Example:
Agent:
"I need to analyze a PDF"
Discovery:
Search available capabilities
Registry:
Finds:
pdf.extract_text
pdf.summarize
pdf.convert
Agent:
Loads MCP tool definition
Agent:
Calls tool
LangChain / LangGraph gives you:
LangChain supports MCP servers through adapters and can dynamically add tools at runtime.
Good for:
Good if you are building around:
Build your own thin layer:
This often ends up being the architecture behind large internal agent platforms.
A common mistake is:
Agent gets 10,000 tools
↓
LLM chooses one
This causes:
Instead:
User request
↓
Semantic tool retriever
↓
Top 5 relevant tools
↓
Agent chooses
↓
Execute
Recent research around MCP tool retrieval explores exactly this pattern: embedding tool descriptions and retrieving only relevant capabilities rather than loading the whole catalog.
For a serious dynamic discovery system:
Tool registry
Discovery service
MCP gateway
Agent runtime
Governance
| Scenario | Pick |
|---|---|
| Enterprise multi-agent platform | LangGraph + MCP + tool registry |
| Microsoft/Azure environment | Semantic Kernel + MCP |
| Internal developer assistants | MCP + lightweight agent runtime |
| Thousands of tools | MCP + vector retrieval layer |
| Autonomous marketplace of tools | MCP + registry + reputation/security layer |
The key point: MCP solves tool interoperability; it does not fully solve discovery. For truly dynamic agents, add a discovery layer that sits above MCP and retrieves only the tools relevant to the current task.