Skip to main content
Glama
abhishekash

MCP Trace Inspector

SpanHound

CI PyPI Downloads GitHub release GitHub stars MCP Registry License: MIT Python 3.11+

Capture local agent traces. Ask your MCP client what happened. SpanHound (formerly mcp-trace-inspector) captures supported Python agent calls, receives OpenTelemetry over local OTLP/HTTP, and exposes read-only MCP tools for failures, approval decisions, token usage, and run comparisons. It reads JSONL spans and OTLP JSON exports as described in the user guide, including traces from agent-harness.

Demo: Watch the full 48-second video · Read the reproducible story. This is a scripted regression trace, not a live-model benchmark.

The project's concrete origin was a shell-boundary regression: the harness blocked cat ../outside.txt, but the old trace recorded only that run_shell was called, not the returned diagnostic. SpanHound and the harness now preserve and query that bounded error.

Try it in one command

uvx spanhound demo
SpanHound demo — recorded agent failure
Tool: run_shell
Failure: error: shell path escapes workspace root: '../outside.txt'
Approval: approve (auto)
Trace: 563e779ee8fa2d7069fc63ed2cf9c8ec (6 spans)

The demo shows a recorded run_shell failure and its approval evidence from a bundled scripted regression trace. It needs no clone, account, trace backend, or MCP client. To inspect your own traces, point SpanHound at a directory of JSONL spans or saved OTLP JSON exports:

uvx spanhound --trace-dir /path/to/traces --check

--check prints the runs it found and exits. Connect an MCP client with the configuration below to ask questions about those runs.

Related MCP server: otel-mcp

Explore the repository fixtures

git clone https://github.com/abhishekash/spanhound.git
cd spanhound
uvx --from . spanhound --trace-dir examples --check

--check also reports a missing directory or malformed complete JSONL or OTLP JSON record.

To try an OTLP JSON export, run the same command with --trace-dir tests/fixtures. The sample export includes a model call, token usage, a tool call, and an exception.

Capture your own traces

For a Python agent, install SpanHound's optional auto instrumentation in the same environment as the agent, then run it through SpanHound:

python -m pip install 'spanhound[auto]'
spanhound run --trace-dir ./traces -- python agent.py

The command starts and stops a local receiver, configures OTLP export, and captures supported library calls without changes to agent.py. The optional package includes instrumentation for OpenAI, Anthropic, OpenAI Agents, HTTPX, and Requests. It reports when no spans were produced. Your Python agent and SpanHound must share one environment; for a uv project, use uv add 'spanhound[auto]' and uv run spanhound run -- python agent.py. See the Python capture guide.

For other runtimes, or agents that already export OpenTelemetry traces, start the receiver in one terminal:

uvx spanhound collect --trace-dir ./traces

Point an agent that already uses an OpenTelemetry trace exporter at the receiver, then run the agent:

export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4318/v1/traces
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
# Start your instrumented agent here.

SpanHound stores each accepted OTLP/HTTP trace request as a local JSON file. Run uvx spanhound --trace-dir ./traces --check to see the captured runs, then connect your MCP client to that folder. The receiver accepts OTLP/HTTP JSON or protobuf on loopback; it does not add instrumentation to an agent. See the capture guide for limits and privacy.

Where it fits

For a live terminal and browser view of local Codex/Claude Code sessions and received OTLP telemetry, try Agent Observatory. SpanHound provides trace investigation through MCP using JSONL and OTLP JSON files.

Use this when you want a local trace view through MCP without setting up a trace backend. Capture supported Python library calls in one command, receive OTLP/HTTP from another runtime, or read the supported JSONL or OTLP JSON formats. Focused queries include recorded approval decisions, bounded failure diagnostics, and run comparisons.

MCP Agent Trace Inspector records steps into a local SQLite database and provides a dashboard and exports. SpanHound auto-instruments supported Python libraries or receives OTLP/HTTP traces, then queries the captured files through MCP. It does not automatically trace arbitrary agent functions or approvals.

For traces stored in Jaeger, Tempo, or Traceloop, use a backend-connected tool such as OpenTelemetry MCP Server. For a trace UI, instrumentation, and evaluations, see Phoenix. SpanHound does not read backend-specific JSON exports.

AI-native use cases

Question during an agent run

MCP tool

Evidence returned

"Why did yesterday's run stall?"

list_runs → slowest_spans

Run IDs and the longest model or tool spans.

"Did the agent act after I denied the write?"

approval_log → span_tree

The recorded decision and subsequent execution path.

"How many model tokens did this run use?"

token_usage → span_tree

Run-level usage totals and the span tree for context.

"Which tool is failing or timing out?"

failure_report / tool_stats

Redacted diagnostics, error rates, denials, and p95 latency.

"Who/what was allowed to act?"

security_audit

Caller, tenant, server provenance, risk, and missing-evidence findings.

"What is happening in the run right now?"

recent_activity

Cursor-based polling of newly written spans.

"Did this model/version regress?"

compare_runs

Cost, latency, tokens, tool calls, and failure deltas.

The tools read stored traces and can poll files being written, but they do not push events or infer intent from the final answer. Start with the installation and user guide, then see the real trace fixture and the tool descriptions for the query contract.

Install & run

uvx spanhound --trace-dir ./traces
# or, for local development:
git clone https://github.com/abhishekash/spanhound
cd spanhound
uvx --from . spanhound --trace-dir ./traces

For a desktop client that accepts MCP Bundles, download the .mcpb asset from the latest release and install the downloaded file in the client; the download link does not open a web page. In Claude Desktop, use Settings → Extensions → Advanced settings → Install Extension… and select the .mcpb file. The bundle asks you to choose a local trace folder. It uses UV to install its Python dependencies on first run. SpanHound reads the folder locally; the connected client receives the evidence returned by its MCP tools.

If you previously ran uvx mcp-trace-inspector, change that command to uvx spanhound to receive this release. The old PyPI distribution stays at 0.3.1; the new package retains its Python import paths and command aliases for clients that install spanhound explicitly.

Client configuration

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "agent-traces": {
      "command": "uvx",
      "args": ["spanhound", "--trace-dir", "/path/to/traces"]
    }
  }
}

pi (~/.pi/agent/settings.json):

{
  "mcpServers": {
    "agent-traces": {
      "command": "uvx",
      "args": ["spanhound", "--trace-dir", "/path/to/traces"]
    }
  }
}

agent-harness (mounted as gated tools):

harness run "Why was my last run slow?" --mcp "uvx spanhound --trace-dir ./traces"

Tools

Tool

Use it when

list_runs

Starting out — recent runs with task, model, duration, cost, decision counts

run_summary

One run at a glance (accepts trace-id prefix)

span_tree

"What did the agent actually do?" — nested shape of the run

slowest_spans

"Why was it slow?" — top-k spans by duration

approval_log

HITL audit — every approve/deny/edit, who decided, and the rationale

token_usage

Cost questions — aggregated across runs or per-run

search_spans

Find spans by tool name, file path, "denied", …

failure_report

Find actionable, bounded, redacted errors and failed tool calls.

tool_stats

Rank tools by volume, error rate, denials, and latency.

security_audit

Audit caller identity, tenant, server provenance, risk, and approval evidence.

recent_activity

Poll new spans with a cursor while a run is active.

compare_runs

Compare selected traces for regressions across models or versions.

Tool descriptions are written as prompts (when-to-use, not just what-it-does) — descriptions are the interface for agent-called tools.

Example session (real fixture trace)

> list_runs
[{ "trace_id": "f920798dd2558fcb84f9977736432a8b", "task": "Summarize the workspace's notes…",
   "tool_calls": 4, "human_decisions": 2, "stopped_reason": "completed" }]

> approval_log
[{ "tool": "write_file", "decision": "approve", "approver": "auto", … },
 { "tool": "run_shell",  "decision": "approve", "approver": "auto", … }]

Design

traces/*.jsonl ──┐
traces/*.json  ──┴─▶ mcp_trace.core (local query functions)
                          │
                   mcp_trace.server (MCP adapter)
                          │
                    stdio (JSON-RPC)
  • core/server split: all logic is pure functions over parsed spans; the MCP layer only parses args and JSON-encodes results. Tests hit both layers.

  • trace_id prefixes: agents fumble full 32-char hex ids; every tool accepts prefixes.

  • bounded output: diagnostics are truncated and obvious credentials are redacted before query results leave the server.

  • honest cost totals: token_usage returns cost_known: false and a null cost when any model span lacks a cost or marks pricing as unavailable; unknown pricing is never presented as $0.

  • cursor polling: recent_activity makes the snapshot reader useful while a run is still writing spans.

  • The demo fixture (examples/example_trace.jsonl) is a real agent-harness run, not hand-written.

Honest limitations

  • MCP stdio transport only (Streamable HTTP plus authenticated remote access is the next transport boundary)

  • live polling re-reads snapshots; it is not a push subscription

  • security audit can only report identity/provenance that the trace producer records

  • read-only tools; trace mutation (annotations) is roadmap

  • The Python query and server modules are available as mcp_trace; older import and command aliases remain for existing clients.

First-run feedback

Tell us what happened when you tried it: your MCP client or trace producer, the question you were trying to answer, and any missing evidence. Share a redacted excerpt when a file fails to load.

License

MIT

Available Tools

12 tools
approval_logA

Human-in-the-loop audit: every approval/denial/edit, who decided, and the rationale.

Use when asked 'why did the agent get to do X?' or 'what was denied?'.

ParametersJSON Schema
NameRequiredDescriptionDefault
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the content and the human-in-the-loop nature of the log, but never states that it is read-only, how far back the log goes, whether results are paginated, or whether it requires a trace_id. Meaningful behavioral traits beyond the payload are left unstated.

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 short sentences with zero filler: the first states what the log contains, the second states when to reach for it. Front-loaded and appropriately sized for a single-parameter read tool.

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?

An output schema exists, so return values need not be described here. However, with no annotations and an undocumented optional trace_id, the description leaves the agent unsure whether a call returns the whole log or requires scoping, which is a real gap for an audit tool.

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

Parameters2/5

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

There is 1 parameter (trace_id) with 0% schema description coverage, and the description never mentions it. The phrase 'every approval/denial/edit' actually implies a full log, giving no hint that passing trace_id narrows scope or that omitting it returns everything.

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

Purpose4/5

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

The description names a specific resource (approval/denial/edit audit log) and enumerates its contents (decision, decider, rationale), so the agent knows exactly what is returned. It does not explicitly contrast itself with near-siblings like security_audit or failure_report, so it falls short of a 5.

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 concrete trigger phrasings ('why did the agent get to do X?', 'what was denied?'), which is clear when-to-use guidance. It stops short of naming an alternative tool or stating when NOT to use it, so no exclusion guidance is present.

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

compare_runsB

Compare selected trace-id prefixes for latency, cost, tokens, tools, and failures.

ParametersJSON Schema
NameRequiredDescriptionDefault
trace_idsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It usefully enumerates the comparison dimensions (latency, cost, tokens, tools, failures) but says nothing about cardinality limits, whether runs must be compatible, or any auth/rate constraints; with an output schema present, the return shape is covered elsewhere.

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?

A single front-loaded sentence with zero filler; the resource and the compared metrics come before anything else.

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?

For a one-parameter read tool with an output schema, the description covers what the tool does but leaves usage conditions and constraints to inference. Adequate, not complete.

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

Parameters4/5

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

Schema coverage is 0% and the single parameter is only titled 'Trace Ids'. The description's phrase 'trace-id prefixes' is the one piece of semantic information available, and it materially changes how the agent should populate the array (prefixes rather than exact ids).

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

Purpose4/5

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

States a specific verb ('compare') and resource ('trace-id prefixes') plus the exact metrics compared, so the agent knows what it produces. It does not differentiate itself from conceptually adjacent siblings like run_summary or tool_stats, which keeps it below a 5.

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

Usage Guidelines2/5

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

There is no explicit when-to-use, when-not-to-use, or alternative named. 'Selected' hints that the caller supplies the set, but nothing tells the agent when comparison is preferable to run_summary or list_runs.

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

failure_reportB

Show bounded, redacted tool/provider failures and their actionable diagnostics.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It does add two genuinely useful traits not in any structured field – output is 'bounded' (limited in volume) and 'redacted' (tokens/PII stripped) – which is real context, but it omits whether this is a read-only operation, what auth is needed, and how the bound is enforced.

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?

A single tightly-worded sentence with no filler; the scoping constraint ('bounded, redacted') is front-loaded before the resource. Efficient, though the extreme brevity contributes to the completeness gaps.

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?

An output schema exists, so return-value explanation is not required. However, with zero parameter documentation, no usage guidance, and no annotations, the definition leaves an agent underspecified on how to scope or interpret the call despite the tool being relatively simple.

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

Parameters2/5

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

Schema description coverage is 0% for both parameters. The description never mentions 'limit' or 'trace_id', so an agent gets no explanation of what trace_id filters on or how limit interacts with the 'bounded' claim. Only the vague word 'bounded' hints at the limit parameter.

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

Purpose4/5

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

Specific verb (Show) plus a well-defined resource: tool/provider failures and their diagnostics. It reads clearly as a diagnostics tool, though it never distinguishes itself from siblings like security_audit or tool_stats that might also surface problem data.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no prerequisites, and never names an alternative among the many sibling tools (security_audit, tool_stats, recent_activity). The context of use must be inferred entirely from the tool name.

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

list_runsB

List recent agent runs: task, model, duration, tool use, human decisions, cost.

Use first to find the trace_id for deeper inspection.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, and it discloses almost nothing behavioral: no statement that this is read-only, no definition of 'recent', no ordering, pagination, or auth context. Only the implicit read-only nature of 'List' and the field list are offered.

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 short sentences, no filler, with the core purpose front-loaded before the workflow hint. Every clause 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?

An output schema exists, so return-value explanation is not needed, and the trace_id workflow hint is useful. But for a tool with zero annotations and an undocumented limit parameter, the description leaves too much undefined (recency window, result count control) to be considered complete.

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

Parameters2/5

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

The single parameter (limit) has 0% schema description coverage, and the description never explains what limit does, its default, or maximum. The field list describes outputs, not parameters, so it does not compensate for the coverage gap.

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

Purpose4/5

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

States a specific verb (List) and resource (recent agent runs) and enumerates the fields the agent will see (task, model, duration, tool use, human decisions, cost). It is clear against generic siblings, though it does not explicitly differentiate itself from close siblings like recent_activity or run_summary.

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?

'Use first to find the trace_id for deeper inspection' gives a concrete workflow position and a reason to pick this tool over the deeper-inspection siblings. No explicit exclusions or named alternatives are given, so it falls short of a 5.

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

recent_activityA

Poll newly written spans using a cursor; useful while an agent run is still active.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
cursorNo
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the key polling/cursor model, which is genuinely useful behavioral context for an incremental-read tool. However it says nothing about what happens at end-of-stream, whether the cursor is mandatory, or how trace_id scopes results.

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?

A single front-loaded sentence with zero waste: it leads with the operation and tacks on the usage condition. Nothing to trim.

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?

An output schema exists, so return values need not be described, and the polling model is captured. But with 0% schema coverage and no annotations, the two unexplained parameters (limit, trace_id) leave the definition short of what an agent needs to call it correctly.

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

Parameters2/5

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

Schema description coverage is 0% and there are 3 parameters. The description explains the purpose of 'cursor' in the polling model but leaves 'limit' and 'trace_id' entirely undocumented in both schema and description, failing to compensate for the coverage gap.

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

Purpose4/5

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

States a specific verb and resource ('Poll newly written spans') plus a mechanism ('using a cursor'). The word 'newly' implicitly distinguishes it from the one-shot search_spans sibling, but no sibling is named, so differentiation is left to inference.

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?

'useful while an agent run is still active' gives a clear temporal context for when to reach for this tool, but it names no alternative (e.g., search_spans) and states no exclusions, so the agent must infer the boundary.

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

run_summaryB

Compact summary of one run (accepts trace_id prefix).

ParametersJSON Schema
NameRequiredDescriptionDefault
trace_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a read-only, abbreviated result via 'compact summary', but says nothing about prefix ambiguity handling (what if the prefix matches several runs), permissions, or truncation behavior.

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?

A single tightly written sentence with zero filler and the resource stated first. It may be slightly too terse given the naming mismatch between 'run' and 'trace_id', but nothing in it is wasted.

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?

An output schema exists, so return values need not be described, and a single-parameter tool is low complexity. Still missing is any when-to-use framing versus the eleven sibling tools and clarification of the run/trace_id relationship, which leaves the agent guessing at selection.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it does so on the one point that matters: trace_id accepts a prefix, not just an exact ID. That is genuinely non-obvious from the schema, though format, minimum length, and ambiguity behavior remain unstated.

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

Purpose4/5

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

States a specific verb (summary) and resource (one run), and the word 'compact' signals the output shape. It doesn't explicitly differentiate itself from siblings like compare_runs or list_runs, and it uses 'run' while the parameter is named trace_id, leaving a small terminology gap.

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

Usage Guidelines2/5

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

No when-to-use guidance and no mention of alternatives such as compare_runs, list_runs, or span_tree. The only usable hint is the parenthetical about trace_id prefixes, which is a calling detail rather than usage guidance.

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

search_spansB

Substring search over span names/attributes, e.g. a tool name, file path, or 'denied'.

ParametersJSON Schema
NameRequiredDescriptionDefault
needleYes
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/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 behavioral burden. It does usefully disclose the search substrate (span names and attributes, not span IDs or payloads), which goes beyond the schema, but it says nothing about case sensitivity, whether the search spans all runs or one, result limits, or ordering. It is a read-only search by implication only.

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?

A single tight sentence with the verb and resource front-loaded and the illustrative examples compactly bracketed at the end. No filler, no restatement of the tool name.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description correctly covers the core search semantics for a two-parameter tool. The unaddressed trace_id scoping is the only substantive hole for an agent deciding between a global and a trace-scoped search.

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% and there are two parameters. The examples give real meaning to 'needle' (substring matched against names/attributes), but 'trace_id' — the parameter that scopes the search — is never mentioned, leaving a meaningful gap the schema does not fill.

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

Purpose4/5

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

States a specific verb and resource — substring search over span names/attributes — and clarifies what a 'needle' can be with concrete examples (tool name, file path, 'denied'). It does not distinguish itself from sibling diagnostics like span_tree or failure_report, so an agent gets no routing comparison.

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

Usage Guidelines2/5

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

The examples describe what values to search for, not when to choose this tool over alternatives such as span_tree or failure_report. There is no when-to-use, when-not-to-use, or prerequisite guidance; the agent must infer the use case from the tool name alone.

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

security_auditC

Audit caller identity, tenant, server provenance, risk, and approval evidence for tool calls.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.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 behavioral burden. 'Audit' implies a read-only inspection and it lists the evidence categories examined, which adds useful behavioral scope, but it does not explicitly state read-only safety, permissions, or side effects.

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?

One tightly written sentence, front-loaded with the verb and resource. Every word earns its place with no filler or repetition.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, but the description omits usage context and parameter semantics for a two-parameter security tool. It leaves significant gaps for an agent to call it correctly in a broader toolkit.

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

Parameters1/5

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

Schema description coverage is 0% for two parameters, yet the description adds no meaning for 'limit' or 'trace_id'. It does not explain default behavior, filtering, or how these parameters shape the audit.

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

Purpose4/5

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

States a specific verb ('Audit') and enumerates the resources audited (caller identity, tenant, server provenance, risk, approval evidence for tool calls). Clear enough to distinguish from generic tools, but it does not differentiate from the related sibling 'approval_log' or others.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as approval_log or failure_report. It describes what is audited but not the investigative context or exclusions that would tell an agent when this is the right call.

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

slowest_spansA

Top-k slowest spans. Use for 'why was this run slow?'. Omit trace_id to search all runs.

ParametersJSON Schema
NameRequiredDescriptionDefault
kNo
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose the key behavioral trait — trace_id is optional and omitting it searches across all runs — which is the main thing an agent needs to know. It says nothing about ordering direction, tie-breaking, limits, or cost of an all-runs scan, which are the remaining unknowns for an unannotated tool.

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?

Three short sentences, zero filler: purpose first, then the use-case trigger, then the scoping rule. Every sentence adds information an agent would otherwise have to guess.

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

Completeness4/5

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

For a simple read-only query tool with an output schema present, the description covers purpose, trigger, and scoping, so return format need not be explained. The only remaining gap is a thin treatment of k, which is minor given the parameter is optional with a default.

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 for both parameters. It implicitly covers k through "Top-k" and explicitly explains trace_id by describing what happens when it is omitted. It never states what k means concretely, its default of 5, or that it bounds the result size, so the compensation is partial.

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

Purpose4/5

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

The description states a specific verb+resource: it returns the top-k slowest spans. That is unambiguous and an agent can picture the result set. It does not, however, distinguish itself from adjacent siblings like span_tree or search_spans, so it stops short of a 5.

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?

"Use for 'why was this run slow?'" gives a concrete trigger scenario, and "Omit trace_id to search all runs" tells the agent how to widen scope. There is no explicit exclusion or named alternative (e.g. span_tree for full hierarchy, search_spans for text search), so it is clear context without routing guidance.

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

span_treeC

Nested span tree of a run — the shape of what the agent did, with durations.

ParametersJSON Schema
NameRequiredDescriptionDefault
trace_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it discloses only that the result is nested and carries durations. It says nothing about read-only safety, whether trace_id must come from list_runs, output size for deep trees, or pagination/depth limits.

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?

One front-loaded sentence with no filler; the resource and the notable payload trait (durations) come first. It is efficient, though the brevity is partly under-specification rather than tight editing.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, but for a tool with no annotations the description leaves the agent without usage routing, the meaning/source of trace_id, or any scale caveat. It is thinner than a minimum-viable definition for a run-inspection tool with many siblings.

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

Parameters2/5

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

The single required parameter trace_id has 0% schema description coverage and is never mentioned in the description. With only one parameter the ambiguous origin of the value (which sibling produces a trace_id) is the key semantic gap, and it is left entirely unresolved.

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

Purpose4/5

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

The description names a concrete resource and shape — a nested span tree of a run, including durations — which is more specific than a tautology and implicitly distinguishes it from flat siblings like search_spans and slowest_spans. It stops short of explicitly differentiating itself from run_summary or compare_runs.

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

Usage Guidelines2/5

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

"The shape of what the agent did" gestures at a use case but gives no explicit when-to-use, when-not-to-use, or named alternative among the eleven siblings. An agent must infer whether this replaces or complements run_summary and search_spans.

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

token_usageB

Token and cost totals. Omit trace_id to aggregate across all runs.

ParametersJSON Schema
NameRequiredDescriptionDefault
trace_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and it discloses almost nothing. It does not state that this is a read-only query, what cost basis or currency is used, or whether the aggregate covers all time or a bounded window. For a metrics tool with zero annotation coverage this is a real gap.

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, and the default-behavior guidance is front-loaded as the second sentence right where the agent needs it. Nothing could be cut without losing information.

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?

An output schema exists, so return-value shape is covered, and with one optional parameter the schema surface is small. Still, for a cost-reporting tool that aggregates across runs, the description omits the aggregation scope (all time? bounded?) and the read-only nature, leaving meaningful agent questions unanswered.

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

Parameters4/5

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

Schema description coverage is 0% and the single optional trace_id parameter has only a bare type declaration, so the description is the sole source of meaning. It supplies exactly the key semantic: omit it to aggregate across all runs, provide it to scope to that trace. Only the accepted ID format is left unstated.

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

Purpose4/5

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

"Token and cost totals" names both resources the tool returns (tokens and cost), which is specific enough to distinguish it from generic stats siblings like tool_stats or run_summary. It is a noun phrase rather than a verb+resource, and it does not explicitly contrast with any sibling, so it falls short of a 5.

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

Usage Guidelines3/5

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

"Omit trace_id to aggregate across all runs" implicitly tells the agent the two usage modes (scoped to one trace vs. global), which is useful. However, it never says when to prefer this tool over tool_stats, run_summary, or compare_runs, so routing between siblings is left entirely to inference.

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

tool_statsB

Rank tools by errors, denials, latency, and call volume to find unhealthy integrations.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
trace_idNo
tool_nameNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It never states the aggregation window, whether results are global or scoped to a trace, what the sort order or tie-breaking is, or that the operation is read-only. Read-only can only be guessed from 'rank'.

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?

A single sentence with the verb, resource, and ranking dimensions front-loaded. There is no filler, no restatement of the tool name, and every word carries information.

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?

An output schema exists, so return values need not be described. However, with three parameters at 0% description coverage and zero annotations, the definition is only minimally viable — an agent could call it with defaults but would not know how to scope or limit the query correctly.

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

Parameters2/5

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

Schema description coverage is 0% for three parameters. The description mentions no parameter at all: limit (result cap), trace_id (scope to one trace), and tool_name (restrict ranking to one tool) are undocumented in both schema and prose. 'Rank tools' loosely gestures at the tool dimension but does not explain that tool_name filters it.

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

Purpose4/5

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

Names a specific verb (rank) plus the resource (tools) and the four ranking dimensions (errors, denials, latency, call volume), so the agent knows exactly what comes back. It does not, however, distinguish itself from overlapping siblings like failure_report or slowest_spans, which cover adjacent slices of the same data.

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

Usage Guidelines3/5

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

The purpose clause 'to find unhealthy integrations' implies a diagnostic use case, but there is no explicit when-to-use, no when-not-to-use, and no pointer to alternatives such as failure_report for error detail or slowest_spans for latency detail. Usage is inferable but not guided.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv0.6.1
    • First observedapproval_log
    • First observedcompare_runs
    • First observedfailure_report
    • First observedlist_runs
    • First observedrecent_activity
    • First observedrun_summary
    • First observedsearch_spans
    • First observedsecurity_audit
    • First observedslowest_spans
    • First observedspan_tree
    • First observedtoken_usage
    • First observedtool_stats

TDQS

A3.5/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have distinct analytical purposes (failure_report, tool_stats, security_audit, span_tree, slowest_spans, etc.), but token_usage and compare_runs overlap in cost/token/latency aggregation, and recent_activity vs list_runs both surface recent runs/spans, which could cause occasional misselection.

Naming Consistency5/5

All 12 tools use a consistent snake_case noun_phrase or verb_noun pattern (failure_report, tool_stats, list_runs, run_summary, span_tree), making names predictable and readable.

Tool Count5/5

12 tools is well within the ideal 3-15 range and each targets a specific diagnostic need (failures, stats, security, activity, comparison, runs, summary, tree, latency, approvals, tokens, search).

Completeness4/5

The surface covers run listing, summaries, span trees, failures, latency, tokens, security, approvals, search, and comparison—strong lifecycle coverage for trace inspection. Minor gaps like deleting/exporting traces or filtering by date/tool in list_runs are workaround-able but not critical.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Unified MCP server for observability and monitoring, providing tools to query metrics, logs, and traces through Prometheus, Grafana, Loki, and Jaeger.
    2
    Mozilla Public 2.0
  • A
    license
    A
    quality
    D
    maintenance
    MCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.
    5
    11 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A read-only MCP server that exposes Hatchet client / REST observability APIs to coding agents across multiple environments from one process.
    MIT