How it works
Selection happens among tools already bound to the request. The model reads names and descriptions as text and emits one name. Overlap decides the winner more than the underlying API. If one description says it handles any delivery problem and another says it only changes pack size, a pack-size request can still match the broader sentence. The call can succeed at the pharmacy system and still be the wrong action for the order.
This is not the tool_choice field, which can force a name before any comparison. Selection is the comparison. Short lists, descriptions that say when not to call, and a line of sample arguments reduce collisions. A harness can also classify the turn first and bind only the winning schema. Log every name that was present on the request, not only the name that ran, or a miss looks like a normal successful call.
A worked example
A pack-size change among three pharmacy tools
Bound on the request:
refund_order: "Use for any problem with a delivered pharmacy order, including the wrong item."
swap_pack: "Change pack size on an open order that has not left the depot. Do not refund."
reship: "Send a replacement after the parcel is recorded lost."
User: Order PH-2041 was 56 tablets and I need 28. It has not shipped.
Model emits one call: refund_order {"order":"PH-2041","reason":"wrong pack"}.
Harness runs it. The pharmacy API returns {"refund":"queued","order":"PH-2041"}.
Assistant: I have queued a refund on PH-2041.
The customer wanted swap_pack. refund_order won because its description claimed any problem, and the other two tools were never called. The API success is a successful refund, not a successful selection.
Illustrative example, not a production trace and not a measured result.
What goes wrong
- Two descriptions cover the same verb, so the model alternates between refund and swap on identical wording. The task looks flaky even though both APIs are healthy.
- A long catalogue pushes the precise tool below the fold of attention, and the model picks the first familiar name. Selection then tracks position, not fit.
- The harness logs only the called name. A reviewer cannot see that swap_pack was available and unused, so the refund is graded as a tool failure instead of a selection miss.
How to measure it
For each call, store the full set of names and the first line of each description that the model saw. Selection quality is the called name against the action the user wording required, judged from the conversation, not from the HTTP status of the winner.
Track how often the next user turn rejects the action ("not a refund"). Break that count down by which competing descriptions were bound. A description edit is the change to compare, on the same order type, before and after.
Further reading
How Abracadabra helps
The customer who writes that they wanted the smaller pack, not their money back, is showing that the wrong tool was chosen even though the refund call returned a success the reply quoted.
Tool events are searchable even when the person never wrote a complaint. Abracadabra keeps the task outcome next to those calls, because a tool can return success while the task is unfinished. MCP analytics, which would group calls by server and tool, is in early access.
Request access to read this on your own agent.