Skip to main content
Glama

Run Cypress specs

cypress_run

Run Cypress headless by spec, path:line, glob, or list and return failure details—file:line, error, screenshot, page URL, console/network errors, and a runId.

Instructions

Run Cypress headless in one launch: a spec, path:line, a glob or a list. Returns per failure file:line, error, screenshot and the page at the failure (URL, console and network errors, similar selectors), plus a runId.

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_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoCypress env values
specNoSpec path, "path:line" for the test at that line, a glob such as cypress/e2e/**/*.cy.ts, or a list. Omit for every spec
cloudNoCypress Cloud: record: true needs projectId and CYPRESS_RECORD_KEY in the server env
headedNoShow the browser
repeatNoRun the selected tests n times, to prove a flaky fix
browserNoBrowser from `cypress info`: chrome, firefox, edge, electron, chrome:beta... Default: the project's
projectNoMonorepos: folder with cypress.config.* (default: from the spec path)
timeoutNoms, default 300000
verboseNoAlso list passing tests
testNameNoOnly tests whose full title contains this
componentNoComponent 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

A3.7/5.0
Behavior4/5

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

Annotations cover safety (readOnly=false, idempotent=false, openWorld=true), and the description adds real context beyond them: everything happens in a single launch, and each failure carries file:line, error, screenshot, plus page URL, console/network errors and similar selectors, and a runId. It stops short of disclosing duration expectations, blocking behavior for long suites, or what a fully passing run returns.

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 dense sentences, front-loaded with the action and invocation forms before the result payload. No filler, and the spec-selector detail is packed rather than spread out.

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

Completeness3/5

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

With 11 parameters, nested objects, and an output schema present, the description spends its limited space restating return values the output schema already covers. It leaves uncovered the operational realities of a non-idempotent, long-running test execution: expected duration, what happens on timeout, and how to follow up on a failure.

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% and the description largely echoes it, restating the spec forms (path:line, glob, list) already documented in the schema. With no added semantics for env, cloud, browser, project, or repeat, 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 verb and resource (run Cypress, headless, in a single launch) and enumerates the accepted spec selectors, so an agent knows exactly what operation this performs. It does not explicitly differentiate itself from cypress_get_failure, whose territory (failure details) partially overlaps the returned payload described here.

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 only implied: 'Run Cypress headless in one launch' suggests a full test run, and 'Omit for every spec' hints at the broadest invocation. No when-to-use versus cypress_get_failure or cypress_list_specs, and no guidance on preconditions such as a configured project.

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