TOO-DEC-02Tier IITool Use as Typed Contract

Tool-Catalog Indexing (Retrieval over Tools)

When the tool catalog is large, retrieve a small, relevant subset before presenting to the agent — do not dump the full catalog into every prompt.

Runtime: DecideAgentOps: Build & IntegrateSee on the matrix →
TOOL-CATALOG RETRIEVAL Goalcurrent step Tool Index200+descriptions Retrievetop-K relevant PromptK tools +mandatory Agent SelectsFlat tool catalogs degrade past ~30-50; retrieval preserves selection accuracy.
In Plain English

This page is the complete instruction page for one pattern called "Tool-Catalog Indexing (Retrieval over Tools)." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward — both the good effects and the costs.

This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.

Context

Model performance on tool selection degrades as catalog size increases. Presenting 200 tools per call both wastes tokens and confuses the model.

Problem

Flat tool catalogs scale poorly past roughly 30–50 tools.

Forces

  • Breadth of capability vs selection accuracy
  • Retrieval freshness vs cost

Solution

Index tool descriptions in a retrieval store. At runtime, retrieve the top-K tools relevant to the current goal or step. Re-retrieve on plan changes. Mandatory tools (e.g. search, human-handoff) are always included.

Applicability

  • Enterprise agent platforms
  • Agents with >30 tools
  • Marketplace / ecosystem agents

Anti-Patterns

  • Hard-coded full catalog in every system prompt
  • Pure alphabetical listing

Consequences

  • +Scales past flat catalog limits
  • +Selection accuracy preserved
  • Retrieval layer to maintain
  • Missed retrievals cause capability gaps