Skip to main content
Glama

generate_playwright_test

Generate a Playwright test suite: smoke checks that hold on any site (status, title, console errors, failed requests, broken links, axe accessibility) plus your steps as real code

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": {
      "testName": "<testName>",
      "url": "<url>"
    },
    "name": "generate_playwright_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
authNoLog in once in a setup project and reuse the session
mobileNoAlso run the smoke checks on an iPhone 13 viewport
actionsNoSteps: actions goto /path · click <sel> · fill <sel> <value> · select <sel> <value> · check <sel> · hover <sel> · press <key> · wait <sel>; assertions visible <sel> · hidden <sel> · text <sel> <text> · url <part> · title <text> · count <sel> <n> · value <sel> <value>
testNameYes
assertionsNoAssertions run after the actions (see actions for the syntax)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / actions / description
      Added value: +"Steps: actions goto /path · click <sel> · fill <sel> <value> · select <sel> <value> · check <sel> · hover <sel> · press <key> · wait <sel>; assertions visible <sel> · hidden <sel> · text <sel> <text> · url <part> · title <text> · count <sel> <n> · value <sel> <value>"
    • addedInput schema / properties / assertions / description
      Added value: +"Assertions run after the actions (see actions for the syntax)"
    • addedInput schema / properties / auth / description
      Added value: +"Log in once in a setup project and reuse the session"
    • addedInput schema / properties / mobile / description
      Added value: +"Also run the smoke checks on an iPhone 13 viewport"
  2. First observed

TDQS

B3.2/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 disclose the substantive behavior — the generated suite includes a fixed smoke-check block plus the caller's steps as executable code — but it never says whether the site is actually crawled during generation, whether tests are executed, or where the generated files land.

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?

A single front-loaded sentence with a tight parenthetical inventory; nothing is redundant. The dense comma list is slightly hard to scan, but every element carries information about the generated output.

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?

With six parameters, no annotations and no output schema, the description covers the content of the generated artifact well enough to call the tool. It stops short on operational context — output location and whether anything executes — which keeps it out of the top band.

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?

Schema coverage is 67%, and the two required parameters, url and testName, have no descriptions in either place; the description only implies url is the target site ('hold on any site'). The actions/assertions DSL syntax lives in the schema, and the phrase 'your steps as real code' adds the useful detail that steps are emitted as executable code rather than data.

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

Purpose4/5

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

States a specific verb and resource ('Generate a Playwright test suite') and enumerates what the suite contains: smoke checks for status, title, console errors, failed requests, broken links and axe, plus the caller's steps as real code. The framework name implicitly separates it from the Cypress/Puppeteer/Selenium siblings, though it never names an alternative explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of prerequisites (Node/Playwright install, network access), and no rule for choosing this over generate_cypress_test or generate_puppeteer_test. The only usage signal is the implied 'any site' applicability of the smoke checks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.