Skip to main content
Glama

Analyze an agent tool-call log

analyze_trace
Read-onlyIdempotent

Use 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
traceYesThe 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_msNoA call at or over this many milliseconds is slow. Default 10000.
retry_minNoBack-to-back calls to one tool that count as a retry loop or a repeated call. Default 3.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYes
formatYes
noticeYes
by_toolYes
summaryYes
failuresYes
findingsYes
slow_callsYes
retry_loopsYes
parse_errorsNo
records_readYes
repeated_callsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered; the description adds genuinely new behavior: 'Nothing is stored' and that it does not run the agent or tools. It also discloses the output ordering ('findings worst first'). It does not discuss limits beyond the schema's maxLength, so a 4 rather than a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, all earning their place: trigger, accepted formats, output and boundary. The middle format list is dense but front-loading the use case keeps the entry point clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-input analysis tool with a full output schema and full annotation coverage, the description covers the trigger, input shapes, output ordering, and the key non-behavior (no storage, no execution). Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description repeats the accepted input formats already listed in the trace parameter schema and says nothing about slow_ms or retry_min thresholds, adding no semantics beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('analyze' an agent 'tool-call log') and enumerates the exact findings produced (failed calls, retry loops, repeats, slow calls). It is unmistakably distinct from the feedback-oriented siblings, and an agent can tell what it gets without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Opens with an explicit trigger: 'Use this when the user pastes a log of an AI agent's tool calls and wants to know...'. It also states the negative boundary ('It does not run the agent or any tool'), so an agent knows this is analysis-only, not execution.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.