playwright-report-mcp
v3.4.0Run Playwright tests and surface structured results for AI agents doing test failure analysis.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
run_tests
Run Playwright tests and return structured results.
| Parameter | Type | Description |
|---|---|---|
browser | string | |
env | object | Environment variable overrides for the Playwright child process. Each key must be listed in PW_ALLOWED_ENV. Dangerous names (NODE_*, NPM_CONFIG_*, PATH, proxies, secrets) are always rejected. Values a… |
headed | boolean | Run with a visible browser window. Omitting or setting false leaves playwright.config.ts intact — Playwright has no --no-headed flag, so false does not force headless when the config sets headed. |
maxFailures | integer | Stop the run after this many failures. |
retries | integer | Maximum retry count for flaky tests; 0 disables retries. |
spec | string | Spec file path, e.g. tests/navigation.spec.ts |
tag | string | Tag filter, e.g. @smoke or @regression |
timeout | integer | Timeout in milliseconds for the whole test run. Defaults to 300000. |
trace | string | Force Playwright tracing mode, overriding playwright.config.ts. |
updateSnapshots | string | Update snapshot baselines. Playwright default is "missing"; "changed" updates differing + missing. |
wait | boolean | Wait for completion before returning. Defaults to true. Set false to start a background run and poll it with get_run_status. |
workers | integer | Number of parallel workers (positive integer). |
workingDirectory | string | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. |
get_run_status
Return status for a tracked Playwright run. Pass runId for a specific background run, or omit it to inspect the latest tracked run for a workingDirectory. If no tracked run exists, returns idle with current results.json metadata; it does not inspect unrelated OS processes.
| Parameter | Type | Description |
|---|---|---|
runId | string | Run identifier returned by run_tests with wait=false. |
workingDirectory | string | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. Used to find the latest tracked run when runId is omitted; when s… |
get_failed_tests
Return failed tests from the last run with error messages and attachment paths.
| Parameter | Type | Description |
|---|---|---|
workingDirectory | string | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. |
get_test_attachment
Read the content of a named attachment for a specific test from the last run.
| Parameter | Type | Description |
|---|---|---|
attachmentName * | string | Attachment name, e.g. "AI diagnosis", "DOM" |
testTitle * | string | Exact test title as shown in the report |
workingDirectory | string | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. |
list_tests
List all tests with their spec file and tags without running them.
| Parameter | Type | Description |
|---|---|---|
env | object | Environment variable overrides for the Playwright child process. Each key must be listed in PW_ALLOWED_ENV. Dangerous names (NODE_*, NPM_CONFIG_*, PATH, proxies, secrets) are always rejected. Values a… |
tag | string | Filter by tag, e.g. @smoke |
workingDirectory | string | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. |