Analyze an agent tool-call log
analyze_traceUse this when the user pastes a log of an AI agent's tool calls and wants to know which calls failed, where the agent retried in a loop, which calls it repeated, or which were slow. Pass the log as trace: JSON lines or one JSON value from OpenAI messages, the Responses API, Anthropic messages, Claude Code session JSONL, MCP JSON-RPC, LangSmith, OpenTelemetry spans, or flat rows with tool, args, status or error and duration_ms. Returns findings worst first, per-tool stats, failures, retry loops, repeated calls and slow calls. Nothing is stored. It does not run the agent or any tool.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trace": "{\"tool\":\"probe\",\"args\":{},\"status\":\"error\",\"error\":\"timeout\"}\n{\"tool\":\"probe\",\"args\":{},\"status\":\"error\",\"error\":\"timeout\"}\n{\"tool\":\"probe\",\"args\":{},\"status\":\"error\",\"error\":\"timeout\"}"
},
"name": "analyze_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace | Yes | The tool-call log as text: JSON lines or one JSON value. Reads OpenAI chat messages with tool_calls, Responses API function_call items, Anthropic tool_use and tool_result blocks, Claude Code session JSONL, MCP tools/call requests and answers, LangSmith tool runs, OpenTelemetry tool spans, and flat rows with tool, args, status or error, and duration_ms or timestamps. | |
| slow_ms | No | A call at or over this many milliseconds is slow. Default 10000. | |
| retry_min | No | Back-to-back calls to one tool that count as a retry loop or a repeated call. Default 3. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | ||
| format | Yes | ||
| notice | Yes | ||
| by_tool | Yes | ||
| summary | Yes | ||
| failures | Yes | ||
| findings | Yes | ||
| slow_calls | Yes | ||
| retry_loops | Yes | ||
| parse_errors | No | ||
| records_read | Yes | ||
| repeated_calls | Yes |