Tool calls fail for passing reasons, such as a busy service or a brief network break. Retrying at once can hit the same failure, while retrying with backoff, a wait that grows each time, gives the service time to recover. Cap the retries at three, then report the failure instead of looping.
Checked on 2026-11-29. We did not run any tool for this guide. Every result below is an expected result, marked UNTESTED, for you to confirm on your own files.
Prerequisites
- An agent that can retry a tool call
- The error message from the failed call
- A retry limit, set to three
Steps
1. Read the error first
Read the error message. A missing field or bad input will not be fixed by retrying, so only retry passing errors.
Expected result: The error is marked retryable or not, with the reason written down.
2. Wait, then retry once
Wait a short time, for example 2 seconds, then retry the same call once.
Expected result: One retry is made after a 2 second wait.
3. Double the wait each time
If it fails again, wait 4 seconds, then 8 seconds, for a total of three tries.
Expected result: Three tries are made with waits of 2, 4 and 8 seconds.
4. Report the failure after three tries
If the third try fails, stop and report the error with the log, instead of trying again.
Expected result: The failure is reported with the error and the log, after three tries.
Worked example
A practice search call failed twice with a busy-service error and worked on the third try.
| Try | Wait before | Result |
|---|---|---|
| Try 1 | 0 seconds | Failed, busy |
| Try 2 | 2 seconds | Failed, busy |
| Try 3 | 4 seconds | Worked |
| Tries made | 0 |
Expected result: The call works on the third try after waits of 2 and 4 seconds, so the total wait is 6 seconds (UNTESTED – confirm it yourself.)
Verdict table
| Check | Expected result | Pass? |
|---|---|---|
| Read the error first | The error is marked retryable or not, with the reason written down. | – |
| Wait, then retry once | One retry is made after a 2 second wait. | – |
| Double the wait each time | Three tries are made with waits of 2, 4 and 8 seconds. | – |
| Report the failure after three tries | The failure is reported with the error and the log, after three tries. | – |
Limits
- Backoff does not fix bad inputs or missing permissions; those need a different fix.
- Some services rate-limit retries too, so keep the retry count low.
Sources
- Model Context Protocol (Stanford CS329T slides) – checked 2026-11-29
- The Model Context Protocol (MCP) for compliance data – checked 2026-11-29
- What is the Model Context Protocol (MCP)? – checked 2026-11-29
- Ollama v0.9.1 release notes – checked 2026-11-29
