> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool call accuracy

> Check your agent calls the right tools, with the right arguments, at the right point in the call

## Why this is a common failure point

When an agent books, cancels, looks up or transfers, a tool call does the work, and a tool call can be wrong in ways the conversation hides. The agent says "you're booked for Tuesday" after sending Thursday, looks up the account before verifying the caller, or never calls the tool at all and improvises an answer. The transcript sounds fine; the system of record is wrong.

## How Roark tests it

Tool call accuracy runs your flows and grades every tool call the agent made against the conversation: was it the right tool, were the arguments what the caller actually said, and did the calls happen in a sensible order. You pick which tools to evaluate once, and the template applies that list to all three checks.

***

## Setting it up

Choose the **Tools to evaluate** (all current tools by default), then attach the flows that exercise them through the inline Flows panel.

***

## What it measures

The template seeds these, and you can add or remove metrics in **Advanced** before running.

| Measure                                        | What it tells you                                                  |
| :--------------------------------------------- | :----------------------------------------------------------------- |
| **Tool Invocation Correct (check)**            | Whether the agent called the right tools at the right times.       |
| **Tool Invocation Parameters Correct (check)** | Whether each call carried the arguments the conversation supports. |
| **Tool Invocation Order Correct (check)**      | Whether the calls happened in a logical sequence.                  |

***

## What to look for

* **Parameters fail most.** Dates, times, spellings and numbers are where a tool call silently diverges from what the caller said.
* **Missing calls.** An agent that answers from memory instead of calling the tool fails the invocation check. Those are the calls that give callers wrong information.
* **Order matters for safety.** A lookup before verification is an order failure even when every argument is right.

***

## Over the API

Run it with `POST /v1/simulation/run` and `"template": "tool-call-accuracy"`. `GET /v1/simulation/template` lists what each template accepts.
