Skip to main content
Glama

Inspect a Cypress run

cypress_get_failure
Read-only

Inspect Cypress test run failures to retrieve errors, diffs, stack traces, screenshots, page context, and output for debugging E2E tests.

Instructions

Details of a run from cypress_run. view "failures" (default): each failure with source excerpt, error, diff, stack, screenshot. "page": the page at one failure (DOM/ARIA outline, URL, console and network errors, command log, similar selectors). "tests": every test. "screenshots": image links, the last attempt of each retried test. "output": the end of Cypress's output.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cypress_get_failure"
  }
}

Input Schema

NameRequiredDescriptionDefault
viewNofailures
imageNoAdd the screenshots as images, scaled to 1000 px wide
runIdNorunId returned by cypress_run. "last" is the latest run of this server, which can be another agent's.last
failureNoOnly this failure, by its number in the run result
attemptsNoview "screenshots": also the earlier attempts of retried tests

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the tool could not do its job (not when tests fail)
dataYes
toolYes
runIdNo
summaryYes
nextActionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.2

TDQS

A4/5.0
Behavior4/5

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

The readOnlyHint/openWorldHint annotations already establish the safety profile, and the description adds genuinely behavioral detail: which view surfaces DOM/ARIA outlines, console/network errors, and the command log, and that "screenshots" shows the last attempt of each retried test. It stops short of noting cost/volume traits (e.g., that "page" or "tests" views can be large) that would help an agent budget context.

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?

Highly front-loaded: default view first, then each alternative in a compact list with zero filler sentences. The telegraphic fragment style is efficient, though some listed return fields (source excerpt, diff, stack) partly overlap what the output schema already conveys.

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 an output schema present and good annotation coverage, the description covers the crucial mode-selection behavior, though the caller-facing caveat that runId "last" may be another agent's run lives only in the schema. The interaction between "failure" and the "page" view is the notable omission.

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

Parameters4/5

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

Schema coverage is 80%, so 3 is the baseline, and the description earns more by explaining what each view value actually yields and the retry semantics tied to the "screenshots" view. The image, failure, and attempts parameters are left entirely to the schema, and the coupling between the "failure" parameter and the "page" view is never made explicit.

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 names the resource (details of a run produced by cypress_run) and enumerates every view mode with what each returns, which clearly separates it from the runner sibling cypress_run. The opening is a noun phrase rather than an explicit verb ('retrieve/inspect'), but the content is unambiguous.

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?

It states that "failures" is the default view and characterizes each alternative view (page-level debugging vs. tests listing vs. screenshots vs. raw output), which is the main usage decision an agent faces here. It does not explicitly say when not to use the tool or why to prefer it over cypress_list_specs/cypress_doctor, so it falls short of a 5.

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