A tool call is the moment an agent reaches outside the model: it searches, reads a file, runs a command, calls an API. To the system it is a function call with arguments and a result. To the person relying on the agent, it is evidence of what the agent actually did, and the clearest answer to “why should I believe this?”
This article covers how to present tool calls so they inform without overwhelming: their states, their names, how much detail to show, and what to do when they fail. It is one part of the wider patterns in the guide to agentic UI design.
What a tool call means to a person
People look at tool calls for three different reasons, and a good design serves all three:
- Orientation: what is the agent doing right now?
- Trust: did it actually check, or did it guess?
- Diagnosis: when something went wrong, where and why?
Orientation needs one line. Trust needs the result. Diagnosis needs the raw detail. That points to a layered design: a short row by default, expanding to the evidence on demand.
Four states
From a person’s point of view, a tool call has four states. Step through them here:
| State | Means | Show |
|---|---|---|
| Planned | The agent intends to call the tool | A muted row, present tense, no result |
| Running | The call is in progress | A working mark, present tense |
| Completed | The call returned | A check, past tense, duration, expandable result |
| Failed | The call errored or timed out | An error mark and one sentence on what went wrong |
The most important distinction is between planned and completed. A plan that looks like a result is a quiet form of misinformation: people read a list of steps with ticks and assume they happened. Keep intent visually weaker than outcome. That principle is built into Attuna’s Tool Call.
Names people understand
Tool names are written for models and developers: fs.read, search_kb, browser.capture. People need the action in task terms. Use both, with clear priority:
- The title describes the action and its object: “Reading pricing-page.tsx”, “Searching the support docs for refund rules”.
- The tense follows the state: present while running, past once complete. “Ran 48 tests” is a fact; “Running 48 tests” is a promise.
- The completed title can carry the result: “Searched the support docs: 3 matching articles”. Often that is all anyone needs.
- The tool name sits quietly to the side, in monospace, for people who want it. Hide it on narrow screens.
| Written for the system | Written for people |
|---|---|
fs.read | Read pricing-page.tsx |
search_kb(query) | Searched the help centre for “refund annual plan”: 3 articles |
run_command | Ran the test suite: 48 passed |
http.post | Created a ticket in the support queue |
browser.capture | Captured the checkout at 3 widths |
Under the Model Context Protocol, servers describe each tool with a name, an optional human-readable title and a description (MCP tools specification). Those are a starting point, but they describe the tool, not this particular call. The best titles include the arguments that matter: which file, which query.
Arguments and results
Arguments and results are where trust is earned, and where screens get cluttered. Use progressive disclosure:
- In the row: the action, the key argument, the outcome in a few words.
- Expanded: the full result, formatted for reading. A list of files as a list, search results as titles, a test run as a summary.
- Raw: the exact arguments and response, for developers, behind a further disclosure or in a log view.
Expandable rows should behave like the disclosure pattern: a real button, with its expanded state exposed to assistive technology, and the detail directly after it in reading order.
Main interface or expandable view?
A simple rule decides where detail belongs:
| If the detail… | Put it |
|---|---|
| Changes what the person should do next | In the main interface, always visible |
| Supports the answer | In the expanded row, or as a cited source in the reply |
| Only matters when debugging | In raw output or a log, two steps away |
Sensitive information
Tool arguments and results often contain things that shouldn’t be on screen: tokens, customer data, internal URLs. Showing a call doesn’t mean showing everything it touched.
- Mask secrets and identifiers by default, revealing them only with intent.
- Summarise records rather than printing them: “Read 14 orders”, not fourteen rows.
- Remember that screenshots and screen sharing exist. Expanded detail should be safe to show a colleague.
- Never include credentials in a status line or a notification.
Failure and retries
A failed tool call is information, not necessarily a failed task. Agents often recover by trying another route. The interface should make the failure clear and its consequence clearer:
- One sentence on what went wrong, in plain language: “The payment provider didn’t respond.”
- What it means for the task: “The other checks continued” or “The task stopped here”.
- Retries as separate rows, so people can see the agent tried again rather than a single row that flickers back to running.
- The raw error one click away for anyone diagnosing it.
Many calls at once
Agents often run several tools at once. Show them as a group, each with its own state, in the order they were started, not the order they finished. Reordering as results arrive makes the list jump while people are reading it.
When a step makes more calls than fit comfortably, say ten searches, collapse them into one row with a count (“Searched 10 sources”) that expands to the list. Inside a longer task, Attuna’s Task Progress folds the whole sequence into a footnote once the work is done.
Logs, summaries and evidence
A log is a complete, chronological record for machines and developers. A summary is a selective account for people. Product interfaces usually need the summary in the conversation and the log somewhere else.
The bridge between them is evidence. When a reply makes a claim based on a tool result, cite it there: a search result becomes a source the reader can open. Attuna’s Source Citation puts that reference inline with a compact preview. For a record of every run over time, Run History keeps what ran, how it ended and how long it took.
Technical and non-technical people
The same layered design serves both audiences. Non-technical people stay in the titles and results. Technical people expand to arguments and raw output. Avoid a separate “developer mode” where you can; a single design with deeper layers is easier to maintain and keeps everyone looking at the same truth.
Mapping runtime states
Agent runtimes expose tool calls as events or message parts with their own states. In the AI SDK, a tool part moves through input-streaming, input-available, the approval states, and ends in output-available, output-error or output-denied (AI SDK chatbot tool usage). AG-UI streams comparable tool call events from agent to interface (AG-UI introduction). Either way, it’s worth mapping runtime states to the four the person sees in one place:
import { ToolCall, ToolCallOutput, type ToolCallStatus } from "@/components/ui/tool-call"
/** The tool part states from the AI SDK's chatbot tool usage guide. */
type ToolPartState =
| "input-streaming"
| "input-available"
| "approval-requested"
| "approval-responded"
| "output-available"
| "output-error"
| "output-denied"
type ToolPart = { state: ToolPartState; output?: unknown; errorText?: string }
/** null: the call never ran, so it isn't shown as a failure. */
const STATUS: Record<ToolPartState, ToolCallStatus | null> = {
"input-streaming": "pending", // the model is still writing the arguments
"approval-requested": "pending", // planned, waiting on a person
"approval-responded": "pending", // decided, the result state follows
"input-available": "running", // arguments complete, running
"output-available": "completed",
"output-error": "failed",
"output-denied": null,
}
export function ToolPartView({
part,
doing,
done,
tool,
}: {
part: ToolPart
/** "Searching the support docs" */
doing: string
/** "Searched the support docs" */
done: string
tool: string
}) {
const status = STATUS[part.state]
if (status === null) {
return <p className="px-2 text-xs text-muted-foreground">Not run. You declined {tool}.</p>
}
return (
<ToolCall
status={status}
title={status === "completed" ? done : doing}
tool={tool}
error={part.errorText}
>
{part.state === "output-available" ? (
<ToolCallOutput>{JSON.stringify(part.output, null, 2)}</ToolCallOutput>
) : null}
</ToolCall>
)
}Two decisions in that mapping are deliberate. Both approval states are shown as planned, not running, because nothing has run yet. A declined call isn’t shown as failed, because nothing went wrong: the person chose not to run it. If your runtime is different, the principle is the same: collapse machine states into the handful a person can act on.
Tool calls that change things often need approval first. The guide to human-in-the-loop UX covers what that request should show, and the guide to AI loading states covers the wait around them.