Dynamic tool discovery
Dynamic tool discovery is the runtime process of identifying available tools and obtaining information about their definitions or capabilities.
Build a Multi-Agent System (from Scratch)
Tool discovery is the process of identifying and obtaining the descriptions of tools exposed by an external provider before constructing an agent that can use them.
- How it is used
- Discovers MCP server tools before agent construction, allowing agents to use provider-exposed tools without manual enumeration.
- How deep it goes
- Implements asynchronous session lookup, list_tools(), and conversion of server metadata into MCPTool instances.
- Examples
- Uses a Hailstone MCP server to discover and inspect a tool before agent use.
- What you can do after
- Build it from scratch by querying an MCP session and mapping returned tools into provider-linked MCPTool objects.
Read how Build a Multi-Agent System (from Scratch) explains dynamic tool discovery →
AI Governance
Dynamic tool discovery is the ability of a system to advertise or discover tools after an initial connection has been established.
- How it is used
- Protects agent deployments from MCP server capabilities that change after approval.
- How deep it goes
- Defines the post-connection risk and recommends disabling discovery or reviewing new advertisements before use.
- Examples
- Uses an approved server that later advertises a dangerous fourth tool and runtime tool changes that enable a rug pull.
- What you can do after
- Configure discovery off or require human review of newly advertised tools before agents can use them.
Build an AI Agent (From Scratch)
Tool discovery is the standardized process by which a client requests and receives the definitions of tools available from a server.
- How it is used
- Lets an MCP client request standardized tool definitions before presenting tools to an LLM.
- How deep it goes
- Defines the request-response contract and follows discovery through schema conversion, but stops short of server implementation internals.
- Examples
- Uses a Tavily MCP server to list tavily_search, tavily_extract, tavily_crawl, and tavily_map.
- What you can do after
- Apply it via an MCP ClientSession: initialize, call list_tools(), convert definitions, and pass them to OpenAI.
Read how Build an AI Agent (From Scratch) explains dynamic tool discovery →
Vibe Engineering
On-demand tool discovery is a method in which an agent searches for needed capabilities and receives only matching tool definitions in its context.
- How it is used
- Reduces context overhead by retrieving only capabilities relevant to the agent’s current task.
- How deep it goes
- Defines the search-based pattern and its tradeoffs, but stops short of specifying search ranking or implementation details.
- Examples
- Uses a search tool and contrasts it with exposing fifty tools, code execution, and CLI commands such as gh, kubectl, and psql.
- What you can do after
- Apply it via a search tool that injects matched definitions instead of advertising every connected capability.
Also covered in
- Designing AI SystemsIn early access (MEAP)
- AI Agents in Action, Second Edition
What to know first
- prompt injectionPrompt injection is an attack that introduces instructions through input or context to manipulate an AI system’s behavior or override its intended instructions.
- tool useTool use is the capability of an AI system or agent to request external software operations through defined interfaces to obtain information or perform actions.
Related concepts
- full tool exposurealternative to · Full tool exposure is an architecture in which every connected server advertises all of its tools on every agent request.
- discoverykind of · Discovery is the process of identifying, locating, or examining information, entities, problems, or opportunities relevant to a particular purpose.
- MCPpart of · The Model Context Protocol is an open standard that defines how AI applications connect with external tools, data sources, and other contextual resources.
- mcp clientused by · An MCP client is a software component that connects a host application to an MCP server to discover and invoke capabilities exposed through the Model Context Protocol.
- dynamic broker discoverycontrasts with · Dynamic broker discovery automatically finds available brokers using mechanisms such as multicast or rendezvous rather than relying on a static list.
Questions about dynamic tool discovery
What is dynamic tool discovery?
Dynamic tool discovery is the runtime process of identifying available tools and obtaining information about their definitions or capabilities.
Which Manning books explain dynamic tool discovery?
Build a Multi-Agent System (from Scratch), AI Governance, Build an AI Agent (From Scratch) and Vibe Engineering.
What should I know before learning dynamic tool discovery?
Manning books that teach dynamic tool discovery usually introduce prompt injection and tool use first.
What is the difference between dynamic tool discovery and full tool exposure?
Dynamic tool discovery is the runtime process of identifying available tools and obtaining information about their definitions or capabilities. Full tool exposure is an architecture in which every connected server advertises all of its tools on every agent request.
What is dynamic tool discovery a kind of?
Dynamic tool discovery is a kind of discovery. Discovery is the process of identifying, locating, or examining information, entities, problems, or opportunities relevant to a particular purpose.
What is dynamic tool discovery part of?
Dynamic tool discovery is part of MCP. The Model Context Protocol is an open standard that defines how AI applications connect with external tools, data sources, and other contextual resources.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



