Skip to main content
Glama
ethanasm

mcp-queue-doctor

by ethanasm

Failed jobs

failed_jobs
Read-onlyIdempotent

Identify recently failed jobs and their error messages, grouped by queue, to diagnose retry storms and other queue issues.

Instructions

Jobs that failed within the window, newest first, with the error message pulled from each job's output. Bounded on when the job finished — not on the row merely being in the failed state — so results reflect what broke recently rather than everything still inside the queue's retention period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queueNoRestrict to a single queue.
windowHoursNo
groupByErrorNoAlso return a per-queue breakdown of error frequency and timing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds useful behavioral context: results are bounded by job finish time, and error messages are extracted from job output. This goes beyond what annotations provide and helps the agent understand the exact semantics of the result set.

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 well-structured sentence with no filler. The main purpose is front-loaded, followed by the key nuance about finish-time bounding. Every clause adds value and the contrast with retention period is efficient.

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?

Given the tool's moderate complexity and no output schema, the description covers the essential behavior: what is returned, how it's ordered, and the bounding logic. It mentions error messages and, via schema, the groupByError breakdown. Minor gaps exist (e.g., exact pagination or output format), but annotations and the description together give an agent enough to call the tool correctly.

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 describes 'queue' and 'groupByError', but not 'limit' or 'windowHours'. The description mentions the window and finish-time bounding, which indirectly clarifies that windowHours defines the time window, and 'newest first' implies ordering. While it doesn't fully explain parameter ranges or defaults, it provides enough context to compensate for the 50% schema coverage.

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 clearly states the tool returns failed jobs within a time window, newest first, with error messages. It explicitly distinguishes itself from listing all failed jobs in retention by bounding on finish time, which sets it apart from siblings like stuck_jobs or queue_overview without needing to open their schemas.

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 description explains that results reflect recent failures rather than everything in retention, giving implicit guidance on when to use this tool. It stops short of naming specific alternatives or explicit 'when not to use' criteria, but the contrast with retention period is clear enough for an agent to make the right selection.

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