Skip to main content
Glama

Compile Playwright spec

compile_playwright_spec

Compile validated role-based browser actions and assertions into a Playwright spec saved to your local tests directory.

Instructions

Write validated role-based browser actions and assertions to a Playwright spec in the local tests directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_nameYes
target_urlYes
validated_actionsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
file_pathYes
action_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the description is not contradicting them. The description adds that the tool writes to the local tests directory, which is useful behavioral context. However, it does not disclose whether the tool overwrites existing files, creates new files, or requires specific permissions, which would be valuable for a write operation.

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 a single sentence that is concise and front-loads the key action ('Write validated role-based browser actions and assertions'). It avoids redundancy with the title and schema. It could be slightly more informative about the parameters, but it is appropriately sized for a tool with a rich schema.

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

Completeness3/5

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

The tool has a complex schema with many action types, and the description does not explain the workflow context (e.g., that this is the final step after validation). The output schema exists, so return values are covered, but the description lacks guidance on how the validated_actions should be structured or what happens on write. Given the complexity, a bit more context would help.

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 description coverage is 0%, so the description carries the burden of explaining parameters. The description mentions 'validated role-based browser actions and assertions' which maps to the validated_actions parameter, and 'Playwright spec' maps to the output. However, it does not explain test_name or target_url, nor the structure of validated_actions beyond the schema. The schema itself is rich with descriptions for each action type, so the description adds minimal value beyond what the schema provides.

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?

The description states a specific verb ('Write'), a resource ('Playwright spec'), and a qualifier ('validated role-based browser actions and assertions'), which clearly distinguishes it from the sibling tools scan_dom_accessibility and dry_run_qa_flow. It does not explicitly name the siblings, but the action of compiling a spec is distinct enough that an agent can infer the purpose.

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?

The description implies this tool is used after validation ('validated actions') and writes to the local tests directory, giving some context. However, it does not explicitly state when to use this tool versus the siblings, nor does it mention prerequisites like having run a dry run or scan first. The 'validated' qualifier hints at a workflow but leaves the when-to-use guidance implicit.

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