Skip to main content
Glama

what_failed

Track recent failed shell commands to quickly diagnose errors. Review command history, see why execution failed, and identify how previous runs successfully resolved the issue.

Instructions

Recently recorded commands that exited non-zero, grouped by the prompt they ran under where one was recorded. Tells you what was attempted and failed, and why where suvadu kept the end of the command's output (opt-in [capture] failure_output, for commands an agent hook or suv wrap recorded); without that output it can say what failed but not why. A command that failed before and was then fixed also shows what fixed it most often, inferred from what passed next in the same session and directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNoHow many hours back to look (default: 24)
limitNoMax rows in this page (default: 20)
detailNoAdd directory, duration, executor and session to each row (default: false)
offsetNoRows to skip; pass the response's next_offset to page forward
directoryNoFilter to this directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/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 disclose meaningful behavior: results are grouped by prompt, the failure reason depends on an opt-in capture setting ('without that output it can say what failed but not why'), and fix suggestions are inferred heuristically from what passed next. It does not mention authorization needs or ordering guarantees, but the data-availability caveat is exactly the kind of context annotations would not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the second sentence is a long run-on with nested clauses and parentheses that is hard to parse, and the third is similarly dense. Every clause does add information, but the packaging works against quick comprehension.

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?

There is no output schema and no annotations, so the description must convey the result shape, and it does reasonably: grouped rows, optional failure output, optional fix attribution, with detail/pagination handled by the schema. It could be more explicit about read-only nature and ordering, but for a read-only listing tool this is close to sufficient.

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 hours, limit, detail, offset and directory are already documented with defaults and bounds. The description adds nothing parameter-specific (grouping is not a parameter), so the baseline 3 applies.

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?

States a specific resource and scope: commands that exited non-zero within a lookback window, plus the grouping and fix-inference behavior. An agent can tell this apart from a generic command search. It stops short of naming the nearest sibling (learn_from_failures, command_status) as an alternative, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'Tells you what was attempted and failed,' which signals a failure-triage intent, but there is no explicit when-to-use, when-not-to-use, or pointer to learn_from_failures / command_status for related questions. The agent must infer when this beats a broader command search.

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