Skip to main content
Glama

Group Agent Errors

agent_error_groups
Read-only

Group a window's errored spans by failure class — exception type and a normalised message — so a page of failures reads as its handful of causes. One row per group with its count, distinct traces, last occurrence, the instances it hit and sample trace ids for get_agent_trace.

This is the same read the Rius console's Agent page draws its Exceptions figure from. The unit is errored SPANS with this span's own identity: count is not agent_traces_summary's failed_traces (runs whose ROOT span errored) and the two are labelled, never reconciled or added. The grouping reads span events, so the window is capped like any other unindexed query; a window the server refuses comes back saying so.

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 (e.g. "2026-08-01T00:00:00Z"); overrides the hours-derived value when given. end: optional absolute RFC3339 upper bound; overrides the hours-derived value when given. agent: optional exact agent name — this SPAN's agent identity, the same value agent= filters on for list_spans. Read a name off list_agents or off root_agent on list_agent_traces rather than guessing one. instance: optional exact instance id, narrowing to one running copy of agent. limit: groups per page (default 20, server max 100). The reply says how many errored spans the whole window holds, so a full page is visible as one.

Example:

What is failing for the planner agent today?

{ "name": "agent_error_groups", "arguments": { "agent": "planner" } }

Group this week's failures across every agent.

{ "name": "agent_error_groups", "arguments": { "hours": 168, "limit": 50 } }

Is one copy of planner producing the errors?

{
    "name": "agent_error_groups",
    "arguments": { "agent": "planner", "instance": "inst-planner-01" }
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
agentNo
hoursNo
limitNo
startNo
instanceNo
workspaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), yet the description adds real behavioural context: grouping reads span events so the window is capped like an unindexed query, refusals surface in the reply, and pagination is interpretable because the response reports total errored spans for the window. It does not disclose rate limits or exact cap values, which keeps it at 4 rather than 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?

Front-loaded with the core purpose, then the semantic caveat, then parameter docs, then worked examples. Every section earns its place, though the console-attribution sentence and the dual restatement of the count/failed_traces distinction are slightly redundant.

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?

An output schema exists, yet the description still explains the row shape (count, distinct traces, last occurrence, instances, sample trace ids) and clarifies what the count does and does not mean. Combined with full parameter coverage and window-cap disclosure, an agent has everything needed to call it correctly.

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 coverage is 0%, so the description carries full burden and does so for all seven parameters: workspace formats and default, hours default and interaction with start/end, absolute RFC3339 bounds with override behaviour, agent as this span's identity with guidance to read it from list_agents, instance narrowing, and limit default plus server max. It adds meaning well beyond the bare schema.

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?

States a specific verb, resource and grouping key ('Group a window's errored spans by failure class — exception type and a normalised message') and explicitly distinguishes itself from agent_traces_summary by contrasting `count` with `failed_traces`. An agent can tell this apart from the sibling summary tools without opening either schema.

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?

The examples make concrete usage contexts explicit (per-agent failure triage, cross-agent weekly rollup, instance-level narrowing), and the text routes to get_agent_trace for sample ids and list_agents/list_agent_traces for name discovery. It clearly marks the boundary with agent_traces_summary, but never states an explicit when-not-to-use rule, so it stops 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources