Dynamic Tool Discovery (Tool Search)

Dynamic tool discovery, or tool search, is a mechanism that lets an AI agent find relevant tools at runtime instead of receiving every available tool definition in its initial context.

As an agent platform grows, it may expose hundreds or thousands of APIs, database operations, and Model Context Protocol (MCP) tools. Including all schemas on every request consumes tokens, increases latency, and makes tool selection less reliable. Tool search keeps a compact catalog or search interface in context and loads full definitions only for likely matches.

A typical process is:

  1. The agent receives lightweight tool names, descriptions, or access to a search tool.
  2. It searches using the current task and intent.
  3. The system returns a small set of matching tool definitions.
  4. The agent invokes one through ordinary tool calling.

Discovery may use keyword search, vector search, hybrid search, metadata filters, or learned routing. Access control must be applied before results are shown; search should never reveal tools the user or agent is not authorized to use.

Tool descriptions become retrieval documents and should contain distinctive capabilities, constraints, and selection criteria. Ambiguous descriptions can retrieve the wrong operation even when the search algorithm works correctly.

Dynamic discovery complements agent skills. A skill provides procedural knowledge, while tool search locates executable capabilities. Both reduce context consumption through progressive disclosure.

The Claude tool search documentation describes server-side discovery that defers loading tool definitions until they are needed.

The LLM Knowledge Base is a collection of bite-sized explanations for commonly used terms and abbreviations related to Large Language Models and Generative AI.

It's an educational resource that helps you stay up-to-date with the latest developments in AI research and its applications.

Promptmetheus © 2023-present