Skip to main content
Glama

Analyze a test failure

get-failure
Read-onlyIdempotent

Analyze one failure from the most recent run: get full message/code frame, expected vs actual, stack trace, failed network requests, console errors, failure kind, and next steps.

Instructions

Analyze one failure from the most recent run-test execution: full message and code frame, expected vs actual, stack trace, failed network requests (4xx/5xx and dead endpoints), console errors, failure kind (assertion/timeout/browser-crash/syntax/config/server-unreachable) and concrete next steps. Use run-test first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo1-based failure index from the last run (default 1)
projectRootNoOnly used to re-read the stored report

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false, so safety is covered; the description adds real value by disclosing that it operates on the stored output of the last run-test execution and by enumerating the failure-kind taxonomy (assertion/timeout/browser-crash/syntax/config/server-unreachable). It omits the failure modes of the tool itself, e.g. what happens when no failures exist or the index is out of range.

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?

A single dense sentence, front-loaded with what is returned, with no filler. It is heavy on enumeration and could be split, but every clause carries information the agent needs.

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?

With no output schema, the description must describe the return value, and it does so thoroughly (message, code frame, expected vs actual, stack trace, network requests, console errors, failure kind, next steps). The remaining gap is edge-case behavior — no failures recorded, invalid index, or stale report — which would matter for reliable invocation.

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 both parameters are documented in the schema, including the 1-based index and the default of 1. The description only implies the index scoping ('one failure from the most recent run-test execution') and never mentions projectRoot's re-read role, so it adds little beyond the schema — the baseline 3.

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 (analyze) and resource (one failure from the most recent run-test execution) plus the exact payload the agent will get back. It is clearly distinguishable from siblings like analyze-history (historical) and suggest-fix (remediation), which serve different intents.

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?

Explicitly says 'Use run-test first,' establishing the prerequisite ordering against the sibling that produces the report. It does not, however, say when to prefer suggest-fix or diagnose-flaky after a failure is retrieved, so the routing guidance stops one step short of complete.

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