Skip to main content
Glama
Pawangunjkar

agent-trace-mcp

by Pawangunjkar

trace_record

Record an agent or MCP tool call span to a trace, capturing latency, token usage, and errors for a given run. Use the same run_id for all spans in a user turn.

Instructions

Append one agent or MCP tool span. Reuse run_id for every span in the same user turn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
toolYes
agentYes
errorNo
run_idNo
tokens_inNo
latency_msNo
tokens_outNo
args_previewNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It clearly discloses that the tool appends/writes a span (a mutating action) and explains run_id grouping, but it does not discuss persistence semantics, whether run_id must already exist, or error behavior. This is adequate but not rich.

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

Conciseness5/5

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

Two sentences, no filler, with the core action front-loaded and the run_id guidance immediately after. Every sentence earns its place.

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

Completeness3/5

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

The tool is simple enough that the purpose and grouping rule may suffice for a basic call, and an output schema exists to cover return values. However, with no annotations and no parameter descriptions for several fields, an agent still has to infer several semantics and the expected lifecycle around run_id.

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 0%, so the description must compensate. It explains the central grouping parameter (run_id) and indicates that agent and tool identify the span, but leaves ok, error, tokens_in/out, latency_ms, and args_preview to inference from their names. This is a minimal viable explanation rather than complete guidance.

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?

The description uses a specific verb and object — 'Append one agent or MCP tool span' — so an agent knows exactly what operation is performed. This write-oriented purpose is clearly distinct from the read/aggregation sibling tools (trace_list_runs, trace_get_run, trace_failed_tools, trace_status, etc.).

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

Usage Guidelines4/5

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

It gives a clear usage context: call this per span, and reuse run_id across all spans in the same user turn. It does not explicitly name alternatives or when-not-to-use conditions, but the sibling set makes the read-vs-write split obvious.

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