liveBook · Manning

Dynamic tool discovery

Dynamic tool discovery is the runtime process of identifying available tools and obtaining information about their definitions or capabilities.

How 4 Manning books explain it

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.

Read how AI Governance explains dynamic tool discovery →

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.

Read how Vibe Engineering explains dynamic tool discovery →

Also covered in

What to know first

Related concepts

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.