AI Tool-Call Trace Explorer

Paste an agent transcript: see every tool call in order, with errors, timings, retries and loops.

JSON array / {messages:[…]} of chat messages, Responses API items, or JSON Lines events {ts, type, name, input, output, error, duration_ms}.

More options
characters

Try an example: ·

More about this tool

Part of Agentlab AI infrastructure & agent explorers

How it works

Reads an AI agent transcript – OpenAI chat messages with tool_calls, OpenAI Responses function_call items, Anthropic messages with tool_use/tool_result blocks, or generic JSONL events – and rebuilds the ordered timeline of tool calls with (truncated) inputs and outputs, errors, durations, repeated identical calls (retries and loops), per-tool statistics and the slowest calls. Only execution events are analysed; hidden reasoning is never reconstructed.

  • OpenAI chat: assistant tool_calls are matched to role "tool" messages by tool_call_id (legacy function_call by name). OpenAI Responses: function_call ↔ function_call_output by call_id. Anthropic: tool_use ↔ tool_result by tool_use_id; is_error is respected.
  • Generic events: start/end pairs are matched by id (or the latest open call of the same tool); single events with input + output/error count as complete calls. Durations come from duration_ms or end − start timestamps.
  • A result counts as an error when it is flagged (is_error, error field, error/fail event type) or its text starts with error/exception/traceback or mentions an HTTP 4xx/5xx status, a timeout, ENOENT or “permission denied”.
  • Repeats: calls with the same tool name and canonically identical arguments (key order ignored). ≥ loop threshold → loop; otherwise a repeat after a failed attempt → retry; else duplicate.
  • Reasoning/thinking blocks are counted but never displayed or reconstructed; only execution events (calls and results) are shown.

Use this tool in an app

These free programs for your browser have this tool built in, next to everything else the task needs.

  • Agentlab AI-agent & LLM workbench

    Test an AI agent before release: permissions, traces, costs, citations and output checks.

    Open Agentlab

Related tools

  • AI Agent Tool Explorer – Index of tools AI agents can call: this site, the MCP Registry or your definitions, by capability.
  • Structured Output Validator – Validate AI JSON output against a JSON Schema: parse errors with line/column, plain-language fixes.
  • Agent Permission Graph – See what your AI agent can reach: MCP servers, commands, files, network and secrets – with risks.

How to use the AI Tool-Call Trace Explorer

Rebuild the tool-call timeline of an OpenAI, Anthropic or JSONL agent transcript and spot errors, retries, loops and slow calls.

What it is for

When an AI agent gives a wrong answer, takes forever or burns through tokens, the explanation is usually in its tool calls. It may have called the same search three times with identical arguments, retried after a rate limit, missed an error hidden in a tool result, or spent most of its time waiting on one slow tool. Raw transcripts make that hard to see. Calls and results are separate messages linked by ids, arguments are JSON strings inside JSON, and dozens of turns scroll by.

Paste a transcript and the tool rebuilds the ordered timeline of calls. Supported formats are OpenAI chat messages with tool_calls, OpenAI Responses function_call items, Anthropic messages with tool_use / tool_result blocks, and generic JSONL events. For each call you see the (truncated) input and output, the status, any error and the duration. It also groups identical calls into retries and loops and gives per-tool statistics and the slowest calls.

It analyses execution events only. Reasoning or thinking blocks are counted but never shown or reconstructed, so the tool can tell you what the agent did, not why.

Worked example

The first built-in example is an OpenAI chat transcript. The user asks for the weather in Berlin and 20 EUR in USD.

Tool calls: 6; distinct tools: 3 (openai); errors: 1; loops: 1; retries: 1.

Worked example
#ToolInputResult
1get_weather{"city":"Berlin"}{"temp_c":14,"conditions":"cloudy"}
2convert_currency{"amount":20,"from":"EUR","to":"USD"}error: rate limit exceeded (429)
3convert_currencysame as #2{"result":21.7}, a retry after error
4–6search_web{"q":"Berlin weather tomorrow"} ×3"No results" each time, a loop

The retry is healthy: it failed once and succeeded on the second try. The loop is the problem. The agent repeated an identical search three times and got the same empty answer each time. The fix lives in the prompt or the tool: tell the model to change its query after an empty result, or have the tool return guidance instead of a bare "No results".

The JSONL example has timings. run_tests took 8,400 ms and failed ("Exit code 1: 2 failing"), then edit_file ran for 35 ms, then run_tests took 7,900 ms and passed. Tool time totals 16,455 ms of a 20,900 ms wall clock, and one hidden reasoning block was counted.

How to read the result

  • Calls — the timeline: index, tool, input, output or error, status, start time, duration, and repeatOf pointing to the first identical call.
  • Stats per tool — calls, errors, missing result and timings. "Missing result" counts calls with no matching result message (a cut-off transcript), not a tool that returned "No results".
  • Repeats — identical calls (same tool, same arguments, key order ignored). They're classified as loop (at or above the threshold, default 3), retry-after-error, or duplicate.
  • Longest — the slowest calls, when durations are available.
  • Totals — overall tool time vs wall-clock time. A big gap is model thinking and generation time.

Tips and common mistakes

  • Paste the complete transcript including tool results. Without results every call looks unanswered.
  • Errors are also detected from text: results starting with "Error", mentioning HTTP 4xx/5xx, timeouts, ENOENT or "permission denied". A tool that hides failures in a friendly message won't be flagged.
  • Lower the loop threshold to 2 for expensive tools, where even one identical repeat is a waste.
  • Raise "Truncate inputs/outputs" (default 200 characters) when you need to see long arguments, and keep it low to scan the shape quickly.
  • For your own agent framework, log JSONL events with ts, type, name, input, output/error and duration_ms to get timings here.

FAQ

Which transcript formats are supported?

OpenAI Chat Completions messages, OpenAI Responses API items, Anthropic Messages with tool_use/tool_result (including is_error), and generic JSON Lines events. Detection is automatic, or you can pick the format.

Why are durations empty for my OpenAI transcript?

Chat messages carry no timestamps. Durations need timed events (duration_ms or start/end timestamps), as in the JSONL format.

Can it show the model's reasoning?

No. Reasoning blocks are only counted. The tool shows calls and results, which is enough to diagnose most retries, loops and errors.

What counts as a loop and what as a retry?

Identical calls at or above the loop threshold are a loop. Fewer identical calls after a failed attempt are a retry. Anything else repeated is a duplicate.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://toolcalltraceexplorer.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://toolcalltraceexplorer.usefulweb.site/mcp · tool name tool_call_trace_explorer
Example request
curl -s -X POST https://toolcalltraceexplorer.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'
Feedback · ideas & bug reports welcome