Skip to main content
Glama
baramubarok

playwright-generate-mcp

by baramubarok

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
set_project_rootA

Explicitly set the target project root directory. Use this as a fallback if playwright.config.* cannot be automatically discovered by other tools.

scaffold_test_domainA

Scaffold the Domain-Driven POM structure for a feature: pages, mock API handlers, real API helpers, custom fixture, dynamic data factory and a spec, plus a shared diagnostics fixture (tests/e2e/support) that records browser console/page/network events. The spec is an explicit skeleton: its tests are test.fixme (skipped) and marked @mcp-skeleton until the TODOs are implemented. Always use this before writing new tests to ensure a consistent structure.

run_playwright_testA

Run a Playwright spec file in the target project and return a bounded, structured result: explicit status, counts, runner/process metadata, up to 5 failures with location, error type, recent steps, browser console errors, page errors and failed requests (from trace.zip and/or the scaffolded diagnostics fixture), screenshot/trace/video/error-context paths, and a compact qualityScore. The project's own reporters (HTML, Allure) keep running. Use detail:'full' or get_failure_details for more. TOKEN ECONOMY INSTRUCTION: In your response, provide a clean, compact 2–3 line summary (status, duration, video link, and failure cause) rather than dumping large markdown tables into chat. If tests fail, analyze the error and formulate a concrete fix proposal in '.page.ts'. To confirm with the user before applying fixes: 1) If an interactive question/selection tool is available in your environment (e.g. ask_question, vscode_askQuestions), MUST use it to present options: ['Apply Fix & Re-run', 'Review Diff First', 'Cancel']. 2) Otherwise, present the options as a clean numbered list in your response so the user can easily reply with just the number.

check_test_prerequisitesA

Read-only preflight check for a target project. Detects the local (or workspace-hoisted) Playwright package, CLI, config, browser builds matching the installed Playwright version, branded channels, optional Allure adapter/CLI, and report artifacts — without installing packages or downloading browsers.

get_failure_detailsA

Get the full diagnostic breakdown for one failing test from a previous run_playwright_test report: exact location, recent steps, call log, browser console errors, page errors, failed requests, and screenshot/trace/video/error-context paths. Pass testId when titles repeat (e.g. the same spec in several projects).

score_test_qualityA

Score a spec file and its imported Page Objects with the TypeScript AST (comments and strings are ignored): % semantic locators vs raw CSS/XPath, assertion density, anti-pattern warnings with line numbers, and scaffold skeleton status.

check_playwright_configA

Statically analyze playwright.config.* (TypeScript AST, not executed) for flakiness-relevant settings (retries, workers, trace, screenshot, video, forbidOnly, fullyParallel) and reporters (HTML/JSON/Allure). Reports whether each value is a literal or a runtime expression. Project-level, not per-spec.

generate_test_reportA

Locate or generate a visual test report. 'quality' and 'html' locate existing reports (the quality dashboard at test-results/quality-report.html; the Playwright HTML report written by the project's html reporter). 'allure' generates allure-report/ from allure-results/ with the local Allure CLI (never downloaded). Returns status: located | generated | not_found | setup_required | generation_failed.

Prompts

Interactive templates invoked by user choice

NameDescription
playwright_write_testWorkflow for scaffolding and writing enterprise-grade Domain-Driven POM tests using scaffold_test_domain, semantic locators, mock/api helpers, and dynamic factories.
playwright_run_and_healFocused workflow for executing Playwright tests, interpreting single-turn failure diagnostics & video recordings, and safely auto-healing selectors in Page Objects.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Each tool targets a distinct phase: setup (set_project_root), preflight (check_test_prerequisites), config analysis (check_playwright_config), scaffolding, scoring, execution, failure drill-down, and reporting. The only mild overlap is between check_test_prerequisites, check_playwright_config, and set_project_root, all of which touch project setup/configuration, but their descriptions clearly delineate read-only checks versus an explicit override.

Naming Consistency5/5

All eight tools follow a strict verb_noun snake_case pattern (set_project_root, check_test_prerequisites, run_playwright_test, get_failure_details, generate_test_report, etc.). No camelCase or mixed conventions; the scheme is fully predictable.

Tool Count5/5

Eight tools is well-scoped for a Playwright test generation and quality workflow. Each tool occupies a distinct stage (setup, preflight, config, scaffold, score, run, diagnose, report) and none feel redundant or padding.

Completeness4/5

The surface covers a full lifecycle: project/config discovery, scaffolding, quality scoring, execution, failure diagnosis, and report generation. Minor gaps exist—no tool to edit/apply suggested fixes or to clean up generated artifacts—but an agent can work around these, and the run_playwright_test description even hints at fix proposals.

Maintenance

ActivityMaintained
ResponsivenessNo issues