Skip to main content
Glama

Triage Playwright Failure Trace

triage_failure
Read-onlyIdempotent

Diagnose a Playwright trace.zip to classify failure causes, surface network and console errors, and return actionable fix recommendations without modifying files.

Instructions

Diagnose a Playwright failure trace.zip and return advisory fix recommendations as Markdown + JSON (classification, failedAction, networkErrors, consoleErrors, recommendations, tracePath) without modifying any files. If tracePath (local path to a .zip trace archive) is omitted, auto-discovers the newest trace under cwd; returns an error if no trace exists or the archive is unreadable. Use as the default entry point for full failure triage; prefer get_failed_network_calls or suggest_locator_fixes when you only need that single slice, or find_latest_trace to check trace existence first.

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": "triage_failure"
  }
}

Input Schema

NameRequiredDescriptionDefault
tracePathNoAbsolute or relative path to a Playwright trace.zip archive (e.g. test-results/checkout/trace.zip). If omitted, automatically discovers the latest trace in the workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • changedInput schema / properties / tracePath / description
      Previous value: -"Absolute or relative path to a Playwright trace.zip archive. If omitted, automatically discovers the latest trace in the workspace."New value: +"Absolute or relative path to a Playwright trace.zip archive (e.g. test-results/checkout/trace.zip). If omitted, automatically discovers the latest trace in the workspace."
  2. Changed1 schema field changedv1.0.0
    • changedInput schema / properties / tracePath / description
      Previous value: -"Absolute or relative path to Playwright trace.zip archive. If omitted, automatically discovers latest trace in workspace."New value: +"Absolute or relative path to a Playwright trace.zip archive. If omitted, automatically discovers the latest trace in the workspace."
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses that no files are modified, that tracePath omission triggers auto-discovery of the newest trace under cwd, that an error is returned if no trace exists or the archive is unreadable, and what the Markdown/JSON output contains. The readOnlyHint and idempotentHint annotations are consistent with this behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and output contract, and every sentence adds useful guidance. The first sentence is long and heavily parenthetical, but the overall structure remains dense rather than wasteful.

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

Completeness5/5

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

There is no output schema, so the description appropriately enumerates the returned Markdown/JSON fields. It also covers the omitted-parameter behavior, auto-discovery fallback, and error conditions, leaving no meaningful gap for calling the tool correctly.

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?

With 100% schema description coverage, the schema already explains that tracePath is an absolute or relative path to a trace.zip archive and that omission auto-discovers the latest trace. The description adds minor clarification about local paths and error behavior when no trace exists or the archive is unreadable, but most parameter meaning is carried by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: diagnose a Playwright failure trace.zip. It enumerates the returned artifacts (classification, failedAction, networkErrors, consoleErrors, recommendations, tracePath) and explicitly distinguishes this tool from get_failed_network_calls, suggest_locator_fixes, and find_latest_trace.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly calls this the default entry point for full failure triage and names the conditions for choosing alternatives: use get_failed_network_calls or suggest_locator_fixes for a single slice, or find_latest_trace to check trace existence first.

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