In this article
  1. Before you start
  2. Why interviewers ask this
  3. Reliable tool use from first principles
  4. The Staff-level answer
  5. The rubric
  6. Three variants of this question
  7. Common mistakes
  8. Follow-up questions
  9. Sources

Before you start

This page belongs to the AI agents learning path. It assumes you know what a prompt is; if not, read prompt engineering first.

Why interviewers ask this

The question separates candidates who have watched an agent demo from candidates who have run one for a week. A demo succeeds once. A product has to succeed on the next hundred runs, with the order of steps changing each time.

A weak answer says "use function calling with a strict schema" and stops. A strong answer says that a schema fixes the shape of arguments but not the choice of tool or the order of steps, then names what does: fewer and clearer tools, validation, errors the model can read, and limits on the loop. A Staff-level answer starts with arithmetic. It shows why per-step accuracy is the wrong number and says how the team would measure the right one. This topic is reported in interviews at AI labs and large tech companies, and it sits next to the agentic AI interview questions.

Reliable tool use from first principles

Tool call
A tool call is a structured request, usually a tool name plus arguments in JSON, that a large language model (LLM) emits so that ordinary code runs a function and returns the result to the model as its next input.
Idempotent tool
An idempotent tool is a tool whose repeated call with the same arguments leaves the world in the same state as one call, so a retry after a failure cannot double its effect. Setting an order's status to shipped is idempotent; adding one item to an order is not.

In plain words

Picture a new assistant who follows a checklist across ten desks. At each desk they can pick the wrong form. They can fill it in wrongly. They can hit a locked drawer. So you check their work over many days. You give them few, clearly labelled forms. You tell them exactly what went wrong at a locked drawer. You print the route on paper where it never changes. The analogy breaks in one place. The assistant remembers yesterday. A model starts each run from the text in its context window.

Reliable multi-step tool use means a chain of tool calls reaches the right end state on nearly every repeated run. You get it two ways: lower each step's failure rate, and remove decisions the model should not make.

Step 1: Measure the whole chain over repeated runs

Reliability is a property of the whole task, measured over many runs. If each step succeeds with probability p and the steps are independent, a chain of n steps succeeds with probability p to the power n. With p of 0.95 (illustrative), a ten-step chain succeeds 0.5987 of the time, and with p of 0.99 it succeeds 0.9044 of the time; at 0.9 per step it succeeds only 0.3487 of the time.1 A model that is right nine times in ten per step therefore fails about 0.6513 of ten-step tasks.1 The formula ignores two real effects: recovery mid-chain and correlated failures. Chains can do better when errors are caught and retried, and worse when failures cluster.

Reliability falls with chain length at every per-step rate, so the per-step rate must be much higher than the whole-task target.
Per-step success (illustrative)5 steps10 steps20 steps
0.900.59050.34870.1216
0.950.77380.59870.3585
0.990.9510.90440.8179

At 0.95 per step, ten steps succeed 0.5987 of the time and twenty steps succeed 0.3585 of the time; at 0.99 per step they succeed 0.9044 and 0.8179 of the time.1

Whole-task success falls as the chain gets longerGrouped bars of whole-task success for chains of 5, 10 and 20 steps at per-step success of 0.90, 0.95 and 0.99; at 0.95 a ten-step chain succeeds 0.5987 of the time.Whole-task success00.515 steps10 steps20 stepsSteps in the chain0.90 per step0.95 per step0.99 per step0.59050.34870.12160.77380.59870.35850.9510.90440.8179Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/how-do-you-get-reliable-tool-use-across-multi-step-tasks.html
Whole-task success falls fast as the chain grows, even when each step looks reliable.CC BY 4.0 — source: How do you get reliable tool use across multi-step tasks?
Text description of the diagram
  • At 0.95 per step, ten steps succeed 0.5987 of the time and twenty steps succeed 0.3585 of the time.
  • At 0.99 per step they succeed 0.9044 and 0.8179 of the time.

The same logic applies to repeated runs. The pass^k idea from τ-bench is a success rate counted only when all k repeated trials of the same task succeed. If a task succeeds 0.8 of the time in one trial (illustrative), it succeeds in all four trials 0.4096 of the time and in all eight trials 0.1678 of the time, assuming independent trials.1 One lucky demo hides that gap. You now know what to measure; the next steps lower the per-step failure rate.

Step 2: Narrow the choices the model must make

Each tool call asks the model to pick a tool and fill in arguments. Fewer, clearer choices mean fewer wrong picks. Give each tool a distinct name and a description that says when to use it and when not to, and merge tools that always run together into one. The Anthropic guide to writing tools for agents covers naming, descriptions and returning useful context, and the prompting guidance applies to tool descriptions as it does to instructions.

Constrain the arguments too. As of October 2026, the function calling guide describes schema definitions and a strict mode that holds arguments to the declared JSON schema. That removes malformed arguments. It does not make the choice of tool, or the order of tools, correct. Where a step must use one tool, the tool-choice setting of the vendor application programming interfaces (APIs) can force or limit the choice. Input: the task and the tool list. Output: one well-formed call. A shared protocol such as the Model Context Protocol standardises how tools are described, not whether the model picks the right one.

Step 3: Validate results and return errors as data

After a call, the code checks the result before the model sees it: does the response match the expected shape, is a required field empty, did the tool time out. A failure is returned to the model as a tool result marked as an error, with a plain message saying what failed and what to try. As of October 2026, the tool use documentation describes passing tool results, including errors, back into the conversation, which lets the model correct a bad argument instead of repeating it.

Retries need limits. If a step fails with probability 0.1 and a failure is detected reliably, two retries lift the step to 0.999, and ten such steps then succeed 0.9900 of the time (illustrative; real failures are not fully independent).1 Retries are safe only for an idempotent tool, or one that carries an idempotency key. For a call that changes the world, such as sending a payment, check state before retrying. You now have a self-correcting step; the last step controls the route.

Step 4: Control the path and limit the loop

Where the order of steps is known, put it in code. A workflow with model calls at fixed points has fewer model decisions than an open loop, and each removed decision removes one chance to fail. The Anthropic essay Building effective agents separates workflows from agents and advises choosing the simplest design that works. Leave the loop open only for the part where the path depends on what the tools return, as in the reasoning-and-acting loop of Yao et al..

Then bound the loop: a maximum number of steps, a budget, checkpoints after each completed step so a failed run resumes instead of restarting, and a human confirmation before an irreversible action, as in human-in-the-loop agents. Long chains also fill the context window, which degrades behaviour; see context rot.

Reliable tool use is built in four layersFlow of four layers: measure the whole chain over repeated runs, narrow the tool choices, validate results and return errors for retry, then fix the path in code with limits.Measurerepeated runsNarrowfew clear toolsValidateerrors andretriesControlpath and limitsDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/how-do-you-get-reliable-tool-use-across-multi-step-tasks.html

Reliability is built in four layers, from measuring the chain to controlling the path.CC BY 4.0 — source: How do you get reliable tool use across multi-step tasks?
Step-by-step description
  1. Measure the whole chain over repeated runs.
  2. Give the model fewer, clearer choices.
  3. Check results and return errors for retry.
  4. Fix the path in code and bound the loop.
  • Reliability is measured over the whole chain and repeated runs.
  • A schema fixes argument shape but not tool choice or order.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

The Staff-level answer

Interviewer asks

How do you get reliable tool use across multi-step tasks?

A strong answer

I start with the arithmetic: if each step is right ninety-five percent of the time, a ten-step chain succeeds about sixty percent of the time. So I measure whole-task success over repeated runs, not single calls. Then I lower the failure per step: few, clearly described tools, schemas for arguments, validation of every result, and errors returned to the model so it can retry, with idempotent tools and a retry limit. Finally I remove decisions: where the order is known I fix it in code, add a step limit and checkpoints, and require a human check before irreversible actions. The trade-off is flexibility against predictability.

What makes it Staff-level: it opens with the compounding arithmetic, separates argument validity from path correctness, and states the cost of each control. Say it in this order: the number, the measurement, the per-step controls, the path controls, the trade-off.

The rubric

The levels differ most in whether the answer treats reliability as a whole-chain property and names what a schema does not fix.
DimensionWeak answerStrong answerStaff answer
Correctness"Use strict function calling."Schemas, validation and retries together.Separates argument validity from tool choice and order.
DepthNames no mechanism.Explains errors returned to the model.Quantifies compounding error and retry limits.
Trade-offsNone stated.Workflow versus agent.Cost of retries, latency, and loss of flexibility.
CommunicationA list of buzzwords.Ordered steps.Number, measurement, controls, trade-off, in about a minute.
Follow-up readinessStuck on "what if a call has side effects".Mentions idempotency.Adds checkpoints, human confirmation and an evaluation plan.

Three variants of this question

How do you stop an agent from calling the wrong tool?

Reduce the list to the tools the current step needs, rename overlapping tools so they differ clearly, and say in each description when not to use it. Then measure tool choice on logged runs, since a schema cannot catch a valid call to the wrong tool.

What if each step is already ninety-nine percent reliable?

Chains still decay: at 0.99 per step, twenty steps succeed 0.8179 of the time.1 Whether that is acceptable depends on the cost of a failure, so add checkpoints and a human check where one failure is expensive.

How do you make a tool call safe to retry?

Make the tool idempotent, or pass an idempotency key so the service can recognise a repeat. For calls that cannot be made idempotent, read the state first and retry only if the change did not happen.

Common mistakes

  • "A strict schema mode makes the agent reliable." (wrong) It makes arguments well formed, nothing more. (right) "A schema fixes argument shape; I still validate results and bound the path."
  • "It worked in my demo, so it is reliable." (wrong) One run says nothing about consistency. (right) "I measure success over repeated runs of the same task and count only runs where all of them pass."
  • "Give the model every tool we have." (wrong) A long list raises wrong picks. (right) "I expose only the tools needed for the current step, with clear descriptions."
  • "Retry until it works." (wrong) Unbounded retries can double a side effect and burn budget. (right) "Retry a limited number of times, only for idempotent calls."

Follow-up questions

Does strict schema mode make tool use reliable?

No. It constrains arguments to the declared schema, but the model can still pick the wrong tool or the wrong order, and a well-formed call can still do the wrong thing. Combine it with result validation and path control.

How many tools should an agent have?

Expose few, well-described tools and merge tools that always run together. As of October 2026, the OpenAI function calling guide advises keeping the number of functions small, and the Anthropic guide to writing tools for agents advises consolidating tools. Test your own tool set and watch where tool choice errors cluster.

When should you use a workflow instead of an agent?

Use a workflow when the sequence of steps is known in advance, because every fixed step is one fewer model decision. Use an agent when the next step truly depends on what earlier tools returned. See the AI agent design guide.

How do you evaluate multi-step tool use?

Log full trajectories, score the end state and the tool choices, and repeat each task several times to catch inconsistency. Keep a fixed set of regression tasks and rerun it after every prompt or tool change; the logged traces show where a chain broke. The page on agent evaluation covers trajectories, tool accuracy and reliability metrics.

What if a tool call changes something and then fails?

Do not retry blindly. Check the current state first, use an idempotency key where the service supports one, and ask a human to confirm when the action is hard to undo.

Key takeaways
  • Whole-task success is roughly the per-step success rate raised to the number of steps, so chains decay fast.
  • Measure reliability over repeated runs of the same task, not from one demo.
  • A schema fixes argument shape, not tool choice or order.
  • Return errors to the model as data, retry only idempotent calls and cap the retries.
  • Fix the path in code where the order is known, and bound the loop with limits, checkpoints and human checks.

Sources

  1. Building effective agents (Anthropic engineering blog) — Anthropic, 19 Dec 2024
  2. Writing effective tools for agents (Anthropic engineering blog) — Anthropic, 11 Sep 2025
  3. τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (arXiv 2406.12045v1) — arXiv (Yao et al.), 17 Jun 2024
  4. ReAct: Synergizing Reasoning and Acting in Language Models (arXiv 2210.03629v3) — arXiv (Yao et al.), 10 Mar 2023
  5. Function calling guide (OpenAI Platform documentation) — OpenAI, 26 Oct 2026
  6. Tool use with Claude (Anthropic documentation) — Anthropic, 26 Oct 2026