Skip to main content
Glama

failure_cards

Idempotent

List task failure cards for a run arm to diagnose failed tasks or fixes/breaks versus a parent run, and save them for later search.

Instructions

List failure cards for one arm: every task with outcome below 1, or, with parent_run and change, the tasks this arm fixed or broke against the parent. Use it to diagnose before proposing; use run_results for all rows, and failures_similar (HB workspaces) to search failures across runs. A card has task_id, group, outcome, reason, payload summary, output and trace pointer unless the scenario renders its own. Also saves the cards to the record store for later search, overwriting identical entries; nothing else changes. Returns an array.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "config": "<config>",
      "run_id": "<run_id>"
    },
    "name": "failure_cards"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoReturn only cards of this exact task group.
limitNoMaximum items to return, at least 1. Omit to return all remaining items.
changeNo`fix` for tasks that improved against parent_run, `break` for tasks that got worse. Omit to list all failures.
configYesPath of the scenario YAML file on the server host, absolute or relative to the server's working directory, for example `scenario.yaml`. It selects the workspace; a server started with --config rejects any other path.
offsetNoZero-based index of the first item to return. Default 0.
run_idYesRun id of the arm to read.
detailsNoInclude payload summaries, outputs and trace pointers. False returns a compact index of task_id, group, outcome and reason; start with false on large runs. Default true.
parent_runNoRun id of the parent arm to pair with; required by change.
aggregationNoRepeat aggregation for the paired comparison: `mean` (default) or `majority`.mean

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.1.9
    • addedInput schema / properties / aggregation / default
      Added value: +"mean"
    • addedInput schema / properties / aggregation / description
      Added value: +"Repeat aggregation for the paired comparison: `mean` (default) or `majority`."
    • addedInput schema / properties / change / description
      Added value: +"`fix` for tasks that improved against parent_run, `break` for tasks that got worse. Omit to list all failures."
    • addedInput schema / properties / config / description
      Added value: +"Path of the scenario YAML file on the server host, absolute or relative to the server's working directory, for example `scenario.yaml`. It selects the workspace; a server started with --config rejects any other path."
    • addedInput schema / properties / details / default
      Added value: +true
    • addedInput schema / properties / details / description
      Added value: +"Include payload summaries, outputs and trace pointers. False returns a compact index of task_id, group, outcome and reason; start with false on large runs. Default true."
    • addedInput schema / properties / group / description
      Added value: +"Return only cards of this exact task group."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum items to return, at least 1. Omit to return all remaining items."
    • addedInput schema / properties / offset / default
      Added value: +0
    • addedInput schema / properties / offset / description
      Added value: +"Zero-based index of the first item to return. Default 0."
    • addedInput schema / properties / parent_run / description
      Added value: +"Run id of the parent arm to pair with; required by change."
    • addedInput schema / properties / run_id / description
      Added value: +"Run id of the arm to read."
  2. First observedv0.1.7

TDQS

A4.2/5.0
Behavior3/5

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

The most valuable disclosure is the side effect: cards are saved to the record store, overwriting identical entries, and nothing else changes — this reconciles a 'list' tool with readOnlyHint=false and idempotentHint=true. Beyond that it only notes the return shape and optional card fields, without rate limits, auth needs, or how the write interacts with concurrent runs.

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 scope, then usage, then behavior and return shape — a sensible ordering with dense sentences. Slightly crowded: the card-field enumeration and 'Returns an array' partly duplicate each other and the details parameter.

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?

With no output schema and nine parameters, the description covers what a card contains, what the return type is, the write side effect, and where to go for other views. Nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so the schema already documents all nine parameters, including the change/parent_run relationship and aggregation. The description reinforces the paired-comparison semantics but adds little syntax or format meaning the schema lacks, so baseline 3 applies.

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 and resource ('List failure cards for one arm') and immediately defines the scope: tasks with outcome below 1, or with parent_run+change the tasks fixed/broke against the parent. That definition alone distinguishes it from run_results and compare_paired.

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 an explicit when-to-use ('diagnose before proposing') plus named alternatives with their roles: run_results for all rows, failures_similar for cross-run search. The agent can route without reading other schemas.

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