When to reach for it
- Many tools are managed.
- Selection and versioning are critical.
- Tools are shared across multiple agents.
A catalog, not a kitchen sink.
Available tools are centrally registered alongside their schemas, descriptions, permissions, and metadata.
In practiceA research agent queries a tool registry to discover and invoke a real-time web-search tool it has never been hardcoded to call.
Tools are not written into the agent. They are entries in a catalogue, and the tool list of a run is built from that catalogue when the run starts.
1 · Register
2 · Use
| Stage | What happens | Tools left |
|---|---|---|
| Registry | Every registered tool | 120 |
| Permission filter | The tools this agent may use | 34 |
| Capability search | Tools described as current news or web search | 3 |
| Model context | A web search, a news search and a page fetcher | 3 |
REGISTRY = []
def register(name, version, description, schema, permission, owner):
REGISTRY.append(dict(name=name, version=version, description=description,
schema=schema, permission=permission, owner=owner))
def tools_for(agent, task, k=3):
allowed = [t for t in REGISTRY if t["permission"] in agent.permissions]
ranked = sorted(allowed, key=lambda t: similarity(task, t["description"]), reverse=True)
return ranked[:k] # only these are sent to the model
reply = model(task, tools=tools_for(agent, task))When to reach for it
When it backfires
The registry grows to 200 tools, many of which are broken or superseded. The agent wastes turns calling stale tools.
Countermeasure
Add a deprecation flag and a last-used timestamp. Prune tools unused for 90 days after audit review.
The registry stores names and schemas but omits latency, cost, and reliability metadata. The agent can't make informed choices.
Countermeasure
Require every registered tool to include a capability card: latency SLA, cost per call, and reliability score.
Threat exposure
Adopting this pattern opens these attack surfaces. Each links to its entry in the threat model.
Full threat model →EU law
Duties from EU law that this pattern helps meet, or that land on it. A reading aid, not legal advice.
An engineer's reading aid, not legal advice. The legal texts and their interpretation are authoritative.
Next pattern
Search patterns, frameworks, and pages.