Skip to main content
Glama

List Agent Traces

list_agent_traces
Read-only

List recent agent traces (one row per trace) newest-first, as a Markdown table.

The trace_id column feeds get_agent_trace. When more traces match than limit, the reply carries a next-page cursor: pass it back as cursor to fetch the next page, rather than raising limit past what a chat can usefully display.

The session column is the ROOT span's session id; pass it to list_spans(session_id=...) to see every span of that conversation across the traces it touched. A span with no session of its own is stamped with its trace id, so a session equal to the row's trace_id means "no session", not a one-trace conversation. Blank where this deployment does not report it yet.

workspace: optional workspace id, name, or org-name/workspace-name when the same name occurs in two of your orgs (defaults to your default; use list_workspaces to discover them). hours: lookback window in hours (default 24), used for whichever of start/end is not given. start: optional absolute RFC3339 lower bound; overrides the hours-derived value when given. end: optional absolute RFC3339 upper bound; overrides the hours-derived value when given. service: optional service-name filter (traces that involve this service). status: optional trace status filter, "Ok", "Error", or "Incomplete". Note a trace reads Error when ANY of its spans errored, so a run that retried a failing step and then succeeded is in here too — read root_status to tell those apart. root_status: optional filter on the ROOT span's own verdict, "Ok", "Error", or "Incomplete". Composes with status rather than replacing it: status="Error" with root_status="Ok" is the recovered slice (children errored, the run itself finished clean), and root_status="Error" alone is the genuine failures. A trace whose root_status column is blank matches neither — the server made no claim about its root. agent: optional exact agent-name filter, matched against the trace's root span — the same value the root_agent column reports, so read a name off a listing rather than guessing one, and pass it back to get every other run of that agent. Agent identity is its own field, not the service name: a run that declares no agent falls back to its service name, so equal root_agent and service columns are that fallback, not two facts. instance: optional exact agent-instance filter, narrowing to one running copy of agent. user_id: optional end-user scope — the exact id, as the user_id column reports it. The END USER is the person your agents served (the user.id your SDK stamps), not a console login. Matched against ANY span of the trace, so a run counts if the user scope was open anywhere inside it. The column, though, is the ROOT span's user, so the two need not agree: a trace whose scope opened after its root matches the filter and still shows a BLANK cell. That gap is the any-span rule working as specified, not a filter that missed — read the trace's spans to see where the scope opened. anonymous: list the traffic carrying NO end user on any span, instead of one user's. A real subject rather than an error case: it is where un-instrumented traffic goes, and its error rate is worth knowing. The console's ?user=anonymous. Pass either user_id or anonymous, never both — they are disjoint by construction. filters: optional list of {"field": ..., "op": ..., "values": [...]} clauses, ANDed together and composable with the named parameters above. Cheapest first: status, agent, service, model, span_kind, operation, session_id are promoted columns and cost the same over any window. attr.<key> and resource.<key> reach a customer's own attributes and are ~10x dearer, so narrow with a column first; they are accepted only over windows of 31 days or less. Ops: eq, ne, in, not_in, gt, gte, lt, lte, exists, not_exists. Substring on an attribute value is refused — use error_text or search instead. Call describe_search_catalog before guessing a key; a rejected clause comes back naming itself. search: optional case-insensitive contains match on span name, span id, trace id, or session id. A session id alone — e.g. a coding-agent session's — finds every trace of that session in one call; on a core that predates session-id search it matches nothing, so fall back to filters=[{"field": "session_id", "op": "eq", "values": [...]}]. error_text: optional free text over the failure itself — the status message and any recorded exception. This is how you find a failure by what it said ("rate limit", "connection reset") rather than by where it was. limit: max rows (default 20). cursor: opaque page token from a previous call's next-page cursor, to fetch the page after it. silent_failure: true keeps only traces flagged by the silent-failure detectors (at least one live finding), false keeps only the unflagged ones. Omit for both. Unrelated to the swallowed_error alert rule kind (formerly silent_failure) that the alert tools manage. failure_mode: optional catalog id (e.g. CF-01) keeping only traces with a live finding of that failure mode.

The Silent failure column reads yes (CF-01, CF-15) for a flagged trace and is blank otherwise; get_agent_trace shows the findings behind it.

The sent_by column names the developer whose ingest key sent the trace (their stable email — a console-made key falls back to its creator's own email, so it usually carries one too). Blank only when the key could not be resolved (unknown, another workspace's, or a failed lookup), or the trace predates attribution.

Example:

Why did checkout-agent start failing at 14:00?

{
    "name": "list_agent_traces",
    "arguments": {
        "agent": "checkout-agent", "status": "Error", "root_status": "Error",
        "start": "2026-09-16T14:00:00Z", "end": "2026-09-16T15:00:00Z",
        "error_text": "rate limit"
    }
}

Failed runs that used gpt-4o and called the send_email tool.

{
    "name": "list_agent_traces",
    "arguments": {
        "status": "Error",
        "filters": [
            {"field": "model", "op": "eq", "values": ["gpt-4o"]},
            {"field": "attr.tool.name", "op": "eq", "values": ["send_email"]}
        ]
    }
}

Example:

Show me the failed runs from the last two days.

{ "name": "list_agent_traces", "arguments": { "hours": 48, "status": "Error" } }

Which runs actually failed, ignoring the ones that retried and recovered?

{ "name": "list_agent_traces", "arguments": { "hours": 48, "root_status": "Error" } }

Show me the runs that hit errors but finished cleanly anyway.

{
    "name": "list_agent_traces",
    "arguments": { "hours": 48, "status": "Error", "root_status": "Ok" }
}

Which runs failed silently with CF-01 this week?

{
    "name": "list_agent_traces",
    "arguments": { "hours": 168, "silent_failure": true, "failure_mode": "CF-01" }
}

checkout-agent's traces between two dates.

{
    "name": "list_agent_traces",
    "arguments": {
        "agent": "checkout-agent",
        "start": "2026-08-01T00:00:00Z",
        "end": "2026-08-08T00:00:00Z"
    }
}

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": "list_agent_traces"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
agentNo
hoursNo
limitNo
startNo
cursorNo
searchNo
statusNo
filtersNo
serviceNo
user_idNo
instanceNo
anonymousNo
workspaceNo
error_textNo
root_statusNo
failure_modeNo
silent_failureNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / failure_mode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / silent_failure
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries most of the burden and does so well: it explains blank-cell semantics (root_status blank matches neither filter; session==trace_id means 'no session'; sent_by blank when unresolvable), relative filter costs (~10x for attr./resource keys), a 31-day window cap, and that rejected clauses name themselves. It stops short of pagination size or response-envelope details, but the output schema covers the return shape.

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?

Purpose and key column semantics are front-loaded before the parameter list, and nearly every sentence carries operational detail. It runs long, though, with six near-parallel examples and some repeated points (the any-span vs ROOT-span user gap, the blank root_status caveat), which costs a bit of scannability.

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 an 18-parameter tool with zero schema descriptions this is essentially complete: every parameter, the ambiguous columns, filter composability and cost, and the no-session/blank conventions are all covered, with worked examples for the common query shapes. Output schema exists, and the description still adds column-level interpretation where the schema cannot.

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

Parameters5/5

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

Schema description coverage is 0% across 18 parameters, and the description documents all 18 with meaning beyond type/default: hours serves whichever of start/end is absent, start/end override it as RFC3339, instance narrows to one copy of agent, anonymous is a disjoint subject from user_id, silent_failure is explicitly disambiguated from the similarly named alert rule kind, and status vs root_status composition is spelled out with concrete slices.

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?

Opens with a specific verb+resource ('List recent agent traces'), states the row granularity ('one row per trace'), ordering ('newest-first'), and output medium ('as a Markdown table'). It also distinguishes itself from get_agent_trace and list_spans by explaining that trace_id and session feed those tools.

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?

Gives explicit routing rules throughout: use the cursor rather than raising limit past what a chat can display; pass session to list_spans for full conversation views; use user_id XOR anonymous ('never both'); use error_text or search instead of attribute substring; call describe_search_catalog before guessing keys. Alternatives and exclusions are named, not implied.

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.