AI Agents Evaluation Tool Use

Agent Tool-Use Evaluation Prompt

Check that the agent calls tools right — the correct tool, valid arguments, the right time, and graceful handling when a tool fails or returns nothing.

Overview

An agent that reasons well but calls tools badly is still broken — it picks the wrong function, passes malformed arguments, calls when it shouldn't, or falls apart when a tool errors. This prompt evaluates tool use specifically: selection, argument correctness, timing, and failure handling, across the scenarios where each goes wrong.

How to use this resource

  1. Assemble the tool-call traces

    Gather the agent runs that exercise its tools, including the cases where a tool fails or returns nothing. The eval checks selection, arguments, timing, and failure handling.

  2. Open this resource in Test Case Prompt Generator

    Load the prompt into Test Case Prompt Generator and fill in the agent tools. It builds the scenarios where each kind of tool-use mistake shows up.

  3. Review the tool-use findings

    Read how the agent scored on picking the right tool, passing valid arguments, calling at the right time, and handling errors gracefully.

  4. Fix the tool logic and re-run

    Use the failures to adjust the agent tool instructions or guardrails, then re-test the scenarios where it slipped.

Why This Works

  • Tool-use failures break agents that reason perfectly otherwise
  • Testing failure handling catches the hallucinated-result-on-error bug
  • Checking the no-tool cases catches over-eager calling

Best for

  • Agents that call functions, APIs, or tools
  • Multi-tool workflows with chained calls
  • Pre-production evaluation of agent tool use

Not for

  • Agents with no tools
  • Evaluating answer quality alone — use the Agent Evaluation Scorecard

Use cases

  • Evaluating a tool-using or function-calling agent
  • Finding wrong-tool and bad-argument failures
  • Testing how the agent handles tool errors

FAQ

What inputs do I need to evaluate an agent's tool calls with this prompt?

Two things: the TOOLS AVAILABLE block — each tool's purpose and argument schema — and a SCENARIO + AGENT TRACE showing the task and the agent's actual tool calls and reasoning. Include runs where a tool errors or returns nothing, since FAILURE HANDLING is one of the six dimensions. The Test Case Prompt Generator builds the eval; you run it in your assistant and own the verdict.

How does this scoring treat an agent that makes up a result when a tool fails?

The rules mark that the most serious case: "Hallucinating a tool result instead of handling the failure is CRITICAL," while a malformed-but-recovered call is only MINOR and a wrong-tool choice is MAJOR/CRITICAL. Each of the six dimensions gets a PASS/FAIL with the specific issue. These are the prompt's own severity labels, not a certified audit — you interpret the findings and decide what to fix.

More resources from Test Case Prompt Generator

Resources that pair well

Related tools

Guides for this resource

Tip: Save time by exploring related resources and tools that integrate with this resource.