New Tool Radar

AI Agents & Automation

How to Fall Back to a Second Tool When an Agent Tool Call Fails

Give an agent a second tool to try when its first tool fails, so one broken tool does not end the run.

Schematic with three steps: Name the fallback tool and its trigger; Run the test question with the primary; Check the answer says which tool was.

One tool failing should not end a run when another tool can answer the same question differently. The graceful-degradation pattern in the n8n error guides is a chain: the primary agent fails, a simpler fallback agent or tool takes over, and a static response plus human escalation is the last resort. Define the fallback in advance, in the agent’s instructions: when the first tool returns an error, try the second tool with the same question, and only if that fails too, say so. A fallback the agent invents on the spot is a guess, not a plan.

What you need

  • A primary tool that sometimes fails, and a second tool that can answer the same question
  • A rule for when to switch: which errors trigger the fallback
  • One test question both tools can answer

Step 1: Name the fallback tool and its trigger

Write into the instructions that when the primary tool returns an error, the agent should try the named second tool with the same question. Name the tool; do not leave the choice open.

Step 2: Run the test question with the primary tool broken

Disable or break the primary tool, run the test question, and confirm the agent switches to the second tool and still answers. If it stops at the first error, the fallback rule is not in the instructions.

Step 3: Check the answer says which tool was used

Read the answer and confirm it notes that the fallback tool supplied it. A fallback answer presented as a primary answer hides a broken tool.

Worked example: synthetic tool fallback

The table below is a synthetic example. It shows the expected result of the tool fallback; no agent was run.

Check Expected Result
Primary tool fails Yes, forced Pass
Agent tries the second tool Yes Pass
Answer still arrives Yes Pass
Answer notes the fallback Yes Pass

Expected result (UNTESTED). the primary tool fails, the agent switches to the second tool, and the answer arrives marked as a fallback answer. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A fallback tool that answers a different question gives a confident wrong answer.
  • The fallback must be named in advance; an agent choosing its own fallback is guessing.
  • If both tools fail, the agent must say so rather than inventing an answer.
  • A fallback that hides a broken primary tool lets the breakage go unfixed.

Sources

See all