A tool call is the point where an agent acts on the world, and it is the most common place an agent goes wrong: it picks the wrong tool, fills an argument with a plausible-but-wrong value, invents a tool that does not exist, or calls the same thing three times. Evaluating tool calls means scoring each call along four independent axes — was the right tool selected, were the arguments correct, was the call valid, and was it necessary — because a single “tool accuracy” number collapses failures that have completely different fixes (a selection error is a prompt or tool-description problem; a bad-argument error is often a schema or grounding problem).

This page is the deep version of the “tool-call correctness” line in Agent Evaluation. The scoring machinery it reuses — schema validation as a deterministic check and an LLM judge for the semantic calls — is general; only the decomposition below is agent-specific.

What a tool call can get wrong

flowchart TD
    S[Tool call] --> V[Valid?]
    V -->|malformed / unknown tool / wrong arity| F1[Invalid call]
    V -->|schema-valid| SEL[Right tool for this step?]
    SEL -->|wrong tool / no call when needed / call when none needed| F2[Selection error]
    SEL -->|correct tool| ARG[Arguments correct?]
    ARG -->|schema-valid but wrong values| F3[Argument error]
    ARG -->|correct| NEC[Necessary?]
    NEC -->|duplicate / no progress| F4[Redundant call]
    NEC -->|advances task| OK[Good call]
  • Validity — is the call well-formed: a real tool name, the right arity, JSON that parses against the schema? Pure structure, caught for free by a deterministic schema check before the call ever executes.
  • Selection — given the state, is this the right tool, and should the agent have called a tool at all? Two asymmetric errors hide here: calling a tool when none was needed (wasteful, sometimes harmful) and answering from memory when a tool was required (the agent guesses instead of looking up).
  • Arguments — the call is schema-valid but the values are wrong: order_id=4815 when the user meant 4851, a date in the wrong timezone, a search query that drops the key constraint. This is the failure deterministic checks cannot see — the JSON is perfect, the meaning is wrong.
  • Necessity — does the call advance the task, or is it a duplicate of one already made and a re-fetch of unchanged state? Redundant calls inflate cost and latency and are an early signal of a looping trajectory.

Metrics

MetricWhat it measuresScorer
Invalid-call rateFraction of calls that are malformed, unknown, or schema-invalidDeterministic
Tool-selection accuracyRight tool chosen for the step (incl. correctly choosing no call)Reference or judge
Argument matchArguments equal the expected values — exact for ids/enums, semantic for free textReference (exact) + judge (semantic)
Redundant-call rateDuplicate or no-progress calls per taskDeterministic (hash of tool+args) + judge
Calls-per-taskTotal calls vs the minimum a clean solve needsCounter

Report selection and argument accuracy separately. A model can score 95% on tool selection and 70% on arguments — averaging them into one number hides that the fix is argument grounding, not tool descriptions.

Ground truth

Two regimes, mirroring retrieval eval. Reference-based: each step has an expected (tool, arguments), and you score selection by tool match and arguments by field-level comparison. Build these from successful human or agent trajectories rather than writing them by hand — the same chunk-anchored inversion used for retrieval eval sets, applied to traces. Reference-free: deterministic checks cover validity and exact-duplicate detection with zero labels, and an LLM judge rates selection and necessity from the tool catalog plus the conversation. Reference-free is how you bootstrap before you have labeled traces; it cannot catch a subtly-wrong argument the way a reference can.

Example

Per-call scoring for one step of a support agent:

State: user asked "refund my order, it arrived broken" (order #4815 in context)
Agent call: issue_refund(order_id="4851", amount="full")
 
- Valid:      yes (schema-valid, real tool)            [deterministic: PASS]
- Selection:  issue_refund is correct here             [reference: PASS]
- Arguments:  order_id 4851 != expected 4815           [reference: FAIL]
- Necessary:  yes, advances the task                   [PASS]
 
Verdict: schema-valid call, wrong target order — the failure deterministic
checks cannot see. Caught only because the reference pinned order_id=4815.

Tradeoffs

ScorerCatchesCostBlind to
Deterministic schema checkMalformed calls, unknown tools, exact duplicatesLowest — runs pre-executionSemantically wrong arguments, wrong tool choice
Reference matchWrong tool, wrong argument valuesMedium — needs labeled tracesValid alternate tools/paths the reference didn’t list
LLM judgeTool-choice reasonableness, necessity, semantic argsHighest — a judge call per step, plus judge biasSubtle value errors a reference would pin exactly

Decision rule: run the deterministic validity check on every call always — it is free and pre-execution, so it can block a bad call rather than just score it. Add reference matching for the high-traffic tools where a wrong argument is costly (payments, deletes). Reserve the judge for selection and necessity on open-ended tasks where no single reference sequence is correct, and calibrate it against human labels because it inherits the verbosity bias that rewards more tool calls.

Pitfalls

Exact argument match flags semantically-equal values

Scoring free-text arguments by string equality marks "refund the full amount" wrong against a reference of "full refund", tanking argument accuracy on calls that were actually correct. Reserve exact match for ids, enums, and booleans; score natural-language arguments with a semantic judge or normalized comparison.

Order-sensitive scoring punishes valid reorderings

Requiring the exact reference sequence penalizes an agent that fetched two independent read-only facts in the other order. Score independent calls as a set; only enforce order where a real dependency exists (you cannot refund before looking up the order).

Schema-valid hides semantically wrong

The most dangerous tool error passes every deterministic check — perfect JSON, real tool, wrong value — and executes against production. Validity gates give false confidence; pair them with reference or judge argument checks, and where the action is irreversible, add a confirmation or dry-run step.

Questions

References