Skip to main content
Glama

run_playwright_test

Run a real Playwright test file to get passed, failed, and skipped counts plus per-test status and failure details with error messages and file:line locations.

Instructions

Run a real Playwright test file and return the structured result: passed/failed/skipped counts, per-test status, and the error message + file:line for every failure.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "run_playwright_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to a Playwright test file, relative to the project root or absolute

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does usefully disclose that this executes a *real* Playwright run rather than a mock and specifies the failure detail returned, but it omits runtime characteristics such as timeouts, headless/browser requirements, and whether tests may mutate external state.

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

Conciseness5/5

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

A single sentence with the action front-loaded and the return contract appended. No filler, no repetition of the tool name, and every clause adds information.

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

Completeness4/5

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

For a one-parameter tool with no output schema, the description compensates well by spelling out the return payload, including failure locations. It stops short of covering execution environment, timeouts, or side effects, which are the remaining gaps for a tool that actually runs a browser.

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?

Only one parameter exists and schema description coverage is 100%, so the schema already documents 'file' as a project-root-relative or absolute path. The description adds no further parameter detail, which matches the baseline 3 for a fully covered single-parameter 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?

States a specific verb and resource ('Run a real Playwright test file') and immediately enumerates the output shape (passed/failed/skipped counts, per-test status, error message + file:line). This is clearly distinct from the interactive browser_* siblings, which click/type/navigate rather than execute a test file.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer it should call this when it has a test file to execute. There is no explicit when-not guidance and no named alternative for interactive browser actions, so the agent must work out the boundary with browser_navigate/browser_click on its own.

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