Skip to main content
Glama

traces

Read-only

Search and inspect AI agent execution records: recent runs, span trees, transcripts, tool calls, errors, sessions, and call-recording metadata for debugging.

Instructions

Trace explorer (mirrors /admin/observability/explorer). action: search (filters -> recent traces, newest first, paged by limit/offset: {traces, total, offset, limit, has_more, notice, ...}) | get (trace_id -> span tree) | span (trace_id + span_id -> full span detail) | transcript (trace_id -> persisted conversation turns + tool calls) | overview (trace_id -> session, per-tool rollup, errors) | session (session_id -> that chat session's traces, newest first — the portal's /admin/sessions/{id} lookup) | audio (trace_id, or session_id -> call-recording METADATA for that conversation: duration, status and the portal path of the playable WAV; never the audio bytes). hours (search only) is clamped to [1, 8760]; status must be success | error | ''; tool (search only) narrows to traces that called that tool by name. search always returns tool_filter_applied: if a tool filter was requested and this is false, the tracing store's match query failed and traces is the UNNARROWED list for the window — do not treat it as "every trace called tool".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "traces"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoConfig branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves.staging
toolNoOnly traces that called this tool (by name).
hoursNosearch: look-back window in hours (1-8760).
limitNosearch: max traces to return (1-100, default 25).
actionNoOperation to run: search | get | span | transcript | overview | session | audio. The tool description lists what each action needs.search
offsetNosearch: skip this many traces (paging).
statusNosuccess | error | '' (both).
span_idNoSpan id within the trace (traces action=get).
trace_idNoTrace id (traces action=search).
agent_kindNoOnly traces of this agent kind.
session_idNosession / audio: the chat session to look up.
search_textNoFree-text match over trace input/output.
channel_slugNoOnly traces from this channel slug.
include_backgroundNoInclude background/diagnostic traces (default off).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the readOnlyHint annotation: search is newest-first and paged, hours is clamped to [1, 8760], and audio returns only recording METADATA, never the audio bytes. Most valuable is the disclosed silent-failure mode — tool_filter_applied=false means the match query failed and the returned traces are UNNARROWED — which prevents a confident wrong conclusion.

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?

Action inventory is front-loaded, constraints follow, and the tool_filter_applied caveat lands last where it belongs. It is a dense run-on block rather than a scannable list, but essentially every clause carries non-obvious information.

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 14-parameter, seven-action tool this is complete: action-to-parameter mapping, ordering, paging, clamping, output shape per action, and the failure caveat are all present, and an output schema covers return values. An agent has everything needed to call it correctly and interpret the result.

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 100%, so a 3 is the baseline, but the description adds action-scoping the flat schema cannot express (hours/tool only valid for search, session_id for session/audio) and restates the clamping and status constraints. It also implicitly corrects the schema's mislabeled trace_id/span_id descriptions by pairing them with get and span.

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?

Starts with a specific identity ('Trace explorer') and then enumerates all seven actions with the input each takes and the shape each returns (search -> paged trace list, get -> span tree, span -> full span detail, audio -> WAV metadata only). An agent can tell exactly what resource family this tool covers and what each action produces.

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?

Per-action routing is explicit: 'hours (search only)', 'tool (search only)', 'span (trace_id + span_id)', 'session (session_id -> that chat session's traces)' — so the agent knows which action to pick and which parameters apply. It stops short of naming alternative sibling tools (e.g. when to use conversation_insights instead), so no explicit when-not guidance.

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