Get Trace Analysis
get_trace_analysisAnalyze failing Playwright test traces to see the failing action, errors, console and request failures, and where to start debugging. Returns a trace-reading runbook when no analysis exists.
Instructions
See what happened inside a failing test. Where trace analysis is on, this is the failing action, errors, console errors, failed requests and the page near the failure, with where to start and what each further step costs. If no analysis is available it returns a runbook for reading the trace with the Playwright CLI (Playwright 1.59+). Pass projectId + testcase_id (the Playwright pw_test_id) for that case's analysis and a short-lived trace download URL; optionally scope with testrun_id. For an e2e test the trace is a markdown page, and the runbook returned says how to read it. Omit the ids to just get the runbook for a trace.zip you already have locally. If analysis_status is processing, call again shortly. To check anything else in an analysed trace, pass find with testcase_id and testrun_id: it searches actions and request file names without a download. Several failures from one run? Pass testcase_ids with testrun_id: one call, with the shared text sent once. Report the root cause and fix.
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": "get_trace_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | Plain text to search for in this test's actions, and its requests by file name (not full URL), for example "quantity" or "cart|checkout" (| means or). Needs testcase_id and testrun_id, and a completed analysis. No match never proves the text is absent from the trace. | |
| projectId | No | Project ID — required to resolve the hosted trace download URL | |
| testrun_id | No | Optional run scope for testcase_id (single run) | |
| testcase_id | No | Playwright pw_test_id of the failing case whose hosted trace to resolve | |
| testcase_ids | No | Several pw_test_ids from one run, instead of testcase_id. Needs testrun_id. Results are under `tests`. |