Skip to main content
Glama

learn_from_failures

Check which project commands fail often, with failure rates and agent-vs-human patterns, before starting work to avoid repeating known-bad approaches.

Instructions

Commands in a project that fail often, with their recorded failure rates and whether agents fail them more than humans. Call it before starting work to avoid repeating a known-bad approach. It reports rates, not diagnoses. Where suvadu kept the end of a failed run's output (opt-in [capture] failure_output, agent-hook and suv wrap commands only), the latest is shown: what the command printed, not a confirmed cause. Each command also shows what most often passed right after its earlier failures in the same session and directory — a corrected command, or an install before a rerun — as an inferred fix, not an observed one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoHow many days back to look (default: 7)
limitNoMax rows in this page (default: 10)
detailNoAdd directory, duration, executor and session to each row (default: false)
offsetNoRows to skip; pass the response's next_offset to page forward
directoryNoDirectory to analyze, including its subtree (defaults to all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so unusually well: it discloses that it reports rates not diagnoses, that output capture is opt-in and limited to agent-hook/uwrap paths, that the shown output is 'what the command printed, not a confirmed cause', and that follow-up commands are 'an inferred fix, not an observed one'. These provenance and interpretation caveats are exactly the behavioral context an agent needs before acting on the data.

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?

The core purpose and the 'call before starting work' directive are front-loaded, and each sentence carries distinct information (rates, capture caveat, inferred-fix caveat). It is dense with hedges and parentheticals, which costs a bit of scannability but no sentence is pure filler.

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?

There is no output schema, so the description must explain what a caller receives, and it does: per-command failure rates, agent-vs-human skew, captured output with its provenance limits, and inferred follow-up commands. Combined with the fully documented input schema, an agent has everything needed to interpret the response 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 description coverage is 100%, so the baseline is 3. The description references the directory/subtree scope implicitly and mentions session context, but adds no syntax, unit, or formatting meaning beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific resource (commands in a project that fail often) and what is reported (failure rates, agent-vs-human comparison), so the agent knows exactly what data comes back. It doesn't explicitly name the sibling it should be preferred over (e.g. what_failed), so it falls short of full sibling differentiation.

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?

"Call it before starting work to avoid repeating a known-bad approach" gives a clear triggering context. There is no statement of when NOT to use it or which sibling to use for the adjacent cases (e.g. recent_commands, what_failed), leaving some routing to inference.

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