Run Cypress specs
cypress_runRun 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
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Cypress env values | |
| spec | No | Spec path, "path:line" for the test at that line, a glob such as cypress/e2e/**/*.cy.ts, or a list. Omit for every spec | |
| cloud | No | Cypress Cloud: record: true needs projectId and CYPRESS_RECORD_KEY in the server env | |
| headed | No | Show the browser | |
| repeat | No | Run the selected tests n times, to prove a flaky fix | |
| browser | No | Browser from `cypress info`: chrome, firefox, edge, electron, chrome:beta... Default: the project's | |
| project | No | Monorepos: folder with cypress.config.* (default: from the spec path) | |
| timeout | No | ms, default 300000 | |
| verbose | No | Also list passing tests | |
| testName | No | Only tests whose full title contains this | |
| component | No | Component tests |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false when the tool could not do its job (not when tests fail) | |
| data | Yes | ||
| tool | Yes | ||
| runId | No | ||
| summary | Yes | ||
| nextActions | Yes |