Skip to main content
Glama

record_failure

Records failed attempts separately from verified conclusions and evidence so agents can stop repeating an approach after two failures and switch to root-cause analysis.

Instructions

Record what was tried and failed. Keep the guess (why_failed_hypothesis) apart from what was proven (verified_conclusion + evidence). Call when: the same approach failed twice - then switch to the root-cause playbook.

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": {
      "attempted": "<attempted>",
      "failed": "<failed>"
    },
    "name": "record_failure"
  }
}

Input Schema

NameRequiredDescriptionDefault
failedYes
evidenceNo
languageNo
attemptedYes
bugfix_idNo
correctionNo
preventionNo
project_dirNo
detect_earlierNo
verified_conclusionNo
why_failed_hypothesisNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden for a write/append operation. It never says where the record is persisted, whether it modifies files under project_dir, whether it requires an existing bugfix_id, or whether repeated calls duplicate entries. The only behavioral value it adds is the semantic split between hypothesis and proven conclusion.

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?

Two short sentences with the purpose front-loaded and the trigger condition second; no padding or restatement of the tool name. The parenthetical field references are an efficient way to bind guidance to schema keys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with no annotations and no output schema, the description covers purpose and trigger but leaves most parameters, storage semantics, and expected result undocumented. An agent could still call it, but not confidently or correctly on the optional fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 11 parameters, so the description must compensate, and it explains only three or four of them (why_failed_hypothesis, verified_conclusion, evidence, and implicitly attempted/failed). The remaining fields — correction, prevention, detect_earlier, language, bugfix_id, project_dir — are left entirely unexplained and an agent must guess their intent and format.

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 first sentence gives a specific verb and resource ("Record what was tried and failed") and the second clarifies the intended data model by separating hypothesis from verified conclusion. It does not, however, distinguish this from plausible siblings such as save_lesson or promote_failure_to_rule, so an agent cannot route between them from this text alone.

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 when: the same approach failed twice" gives a concrete, measurable trigger rather than vague advice, and it names the escape hatch (the root-cause playbook). It stops short of naming the sibling tools an agent should consider instead, so the alternative routing is only implied.

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