playwright-trace-decoder-mcp
v0.2.3MCP server for unpacking and analyzing Playwright trace.zip archives
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_test_metadata
Returns test metadata: title, browser, platform, viewport, and start time
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
get_trace_summary
Returns the failing action and top-level error message from a Playwright trace
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
get_action_timeline
Returns a paginated timeline of all actions with locators and timings. Use limit/offset to page through large traces.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
limit | integer | Max items to return |
offset | integer | Number of items to skip |
get_filtered_network_logs
Returns only 4xx/5xx network responses, stripping static assets. Use limit/offset to page through results.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
limit | integer | Max items to return |
offset | integer | Number of items to skip |
get_console_errors
Returns JS exceptions and warnings. Use limit/offset to page through results.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
limit | integer | Max items to return |
offset | integer | Number of items to skip |
get_aria_accessibility_tree
Returns the ARIA accessibility tree (YAML) for a frame snapshot in the trace. Reduces DOM token cost by ~90% vs raw HTML. Use action_index to target a specific action — defaults to the failed action, or the last snapshot if no failure.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
action_index | integer | Index of the action whose snapshot to use (0-based). Defaults to failed action. |
get_element_state_at_failure
Returns DOM attributes of the failing element at the moment of failure
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
analyze_race_conditions
Detects potential race conditions by finding network requests that were still in-flight when a user interaction action fired. Returns flagged actions with pending requests.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
get_dom_mutation_delta
Diffs the ARIA tree before and after a specific action. Returns added and removed elements so the agent sees exactly what changed without comparing two full DOM dumps.
| Parameter | Type | Description |
|---|---|---|
action_index * | integer | Index of the action to diff (0-based, from get_action_timeline) |
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
get_causal_chain_for_failure
Walks backwards from the failed action and builds a chronological chain of preceding actions, network errors, and console errors. Surfaces the most likely root cause.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
lookback_ms | integer | How far back from the failure to look, in milliseconds (default 5000) |
generate_error_signature
Generates a stable 12-char hash signature for a test failure by normalizing the error message (stripping paths, numbers, UUIDs). Use to group duplicate failures across parallel CI runs without reading each trace manually.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
compare_traces
Compares a passing and a failing trace of the same test. Aligns actions by sequence, finds the first timing or structural divergence, and summarises network differences. Use to diagnose flakiness — what was different in the run that failed.
| Parameter | Type | Description |
|---|---|---|
failing_trace_path * | string | Absolute path to the failing trace.zip |
passing_trace_path * | string | Absolute path to the passing trace.zip |
get_screenshot_at_failure
Returns the screenshot (base64 JPEG) from the trace closest to the moment of failure. Use when get_aria_accessibility_tree returns an empty or unhelpful tree — the image shows exactly what was on screen. Pass screenshot_index to retrieve any specific screenshot from the trace (0-based); omit to get the one nearest to the failure.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
screenshot_index | integer | 0-based index into the screenshot list. Omit to get the one at failure. |
correlate_dom_and_network
Joins the HAR network log and DOM snapshots into an explicit causal chain. For each action where a network response completed and the DOM mutated within ±100ms, returns the triggering request URL, response status, body snippet, and the exact DOM nodes that appeared or disappeared. Background polling and analytics pixels are filtered out. Use to diagnose race conditions and async rendering bugs — removes hallucination from the question 'did this fetch cause this DOM change?'
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
extract_trace_metadata_strict
Strictly inspects a Playwright trace archive and returns format version, retry session breakdown, and HAR payload mode. Handles .pwtrace.zip extensions (newer Playwright CI), multi-retry archives (identifies which retry failed), and all three HAR modes: embed (bodies inline), attach (bodies as separate files), omit (headers only). Use before other trace tools when the archive may be from an unfamiliar Playwright version or CI configuration — confirms the trace is valid and tells you what data is available.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
detect_performance_anomalies
Detects Long Tasks and frame drops that cause Playwright timeouts. Analyses screencast-frame timestamps for main-thread blocking (gaps > 50ms), flags actions that took longer than 500ms, counts concurrent in-flight network requests during each slow action, and checks for monotonically increasing action durations (suspected memory leak). Returns a ranked list of anomalies with a suspected_cause so the agent can distinguish a blocked main thread from network saturation or a navigation timeout — without blaming a missing element.
| Parameter | Type | Description |
|---|---|---|
trace_path * | string | Absolute path to trace.zip, or a URL (https://) to download it from |
frame_drop_threshold_ms | integer | Screencast frame gaps longer than this count as a drop (default 50ms) |
slow_action_threshold_ms | integer | Actions longer than this are flagged (default 500ms) |