glossary

Tools and MCP

Tool failure

A tool failure is a call that errors, times out, or returns data the task cannot use, including a successful HTTP status whose body still leaves the original job unfinished.

Abracadabra Team Glossary

How it works

Failure means the task did not get data it can finish on. That includes a timeout, a schema rejection, an HTTP 4xx or 5xx, an empty list for an id that should exist, and a body that names a different customer. It also includes HTTP 200 with a decline code, a soft error flag, or a null amount. The status line is a property of the transport. The task is a property of whether the person got what they asked for.

Write the failure into the tool message in words the model can act on: what was attempted, the code, and whether a retry is allowed. Swallowing the error lets the assistant claim success. If the tool is not safe to run twice, a timeout should be described as an unknown outcome, not as a cue to charge again. A finished task is a later judgement. A declined card with a polite sentence is still a failed payment.

A worked example

A card charge that returns 200 and declined

User: Take GBP 86 for invoice INV-552 from the card ending 4412.
Model calls capture_payment {"invoice":"INV-552","amount":86,"card_tail":"4412"}.
The payments host answers HTTP 200 in 240ms with body {"authorised":false,"code":"05","text":"do not honour","charge_id":null}.
A thin adapter used to map any 200 to the string "success" and drop the body. In that build the tool message was "success", and the assistant told the customer the invoice was settled.
The corrected adapter writes the tool message as {"authorised":false,"code":"05","text":"do not honour","retry":false}.
The next completion says the bank declined the card and no charge id exists, and asks for another card.
The HTTP status did not change between the two builds. The tool failure was in the body, and only the second tool message let the model say so.

Illustrative example, not a production trace and not a measured result.

What goes wrong

  • The adapter collapses every 200 into success, so a decline, a zero capture, or a wrong invoice id becomes a cheerful tool message and a false receipt.
  • The call times out and the harness retries a capture that may already have authorised. The customer then sees two charges, which is a second failure caused by the recovery.
  • The model reads a proper error tool message and still tells the customer the invoice is paid, because nothing checks the assistant text against the code in the tool message.

How to measure it

Separate transport success from task success. Store HTTP status, the body flag that means authorised or not, and whether the assistant text claimed the invoice was settled. A 200 followed by a denial in the next user turn is a failure the status code hid.

Count timeouts where the tool is not safe to retry, and whether a second capture was sent before a read-back of the charge id. Those pairs are the path from one unknown call to a double charge.

Further reading

How Abracadabra helps

The cardholder who says the bank declined the payment, after the agent said invoice INV-552 was settled, is showing a tool failure that a success status had hidden from the reply.

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.

See it in your own agent's conversations.

Each task, the step where it stops, and the conversations behind every count. Free during early access.