When to reach for it
- Many capabilities are available.
- Selection must follow metadata or policies.
- Missing capabilities must be explicitly detected.
Pick the tool by what it can do, not what it's called.
A request is matched to the tool, agent, or service whose declared capability fits it — selection by capability metadata rather than a hardcoded condition — and a missing capability is detected explicitly instead of silently mis-routed.
In practiceA customer-service orchestrator routes a 'track my parcel' request to the logistics tool and a 'process refund' request to the payments tool, selected by a capability tag rather than a hardcoded condition.
Each tool or agent declares what it can do. A request is matched against those declarations, and a request nobody can serve is reported instead of being sent somewhere anyway.
1 · Declare
2 · Route
| Request | Needed | Match | Outcome |
|---|---|---|---|
| “Where is my parcel?” | Shipment tracking | Logistics tool | Dispatched |
| “Refund order 7731.” | Refund processing | Payments tool | Dispatched |
| “Correct the VAT rate on my invoice.” | Tax correction | None | Reported: no capability, handed to a person |
| “Cancel my order and refund it.” | Cancellation, then refund | Orders tool, then payments tool | Dispatched in sequence |
CAPABILITIES = {
"logistics_tool": {"shipment_tracking", "address_change"},
"payments_tool": {"refund_processing", "payment_status"},
"orders_tool": {"order_cancellation", "order_lookup"},
}
def route(request, caller):
plan = []
# e.g. ["refund_processing"]
for capability in extract_capabilities(request):
tools = [tool for tool, declared in CAPABILITIES.items()
if capability in declared and allowed(caller, tool)]
if not tools:
# explicit, never the nearest tool
return escalate(request, missing=capability)
plan.append(tools[0])
return [call(tool, request) for tool in plan]When to reach for it
When it backfires
Ambiguous capability tags let two tools match the same request. The router picks non-deterministically; downstream behavior drifts run to run.
Countermeasure
Score by capability specificity and break ties with an explicit priority field. Log the score so the chosen tool is auditable.
A request outside every tool's capability gets force-matched to the closest one. The agent runs a tool that was never meant for the task and returns a confident wrong result.
Countermeasure
Require a minimum match score and give the router an explicit no-match branch that declines or escalates, rather than always selecting a best-of-bad option.
Keep going
Search patterns, frameworks, and pages.