Skip to main content
Glama
BobChochola

playwright-fixer-mcp

by BobChochola

Validate and apply fix to spec

validate_and_apply_fix

Validate proposed code changes against Playwright locator rules, then apply them to the spec file if no violations are found; otherwise, return violations for correction.

Instructions

Validate proposed code changes against LOCATOR_VIOLATION_RULES (no XPath, no bare CSS classes, iframe must use frame.locator), then apply to spec file. Returns violations if any error-level rule is violated — model must fix and retry. This is the only valid path to write spec changes; direct file edits bypass LOCATOR_RULES enforcement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specFilePathYesAbsolute path to the spec file to modify
failureContextNoFailure context for context-specific validation (e.g. iframe enforces frame.locator usage)
proposedChangesYesList of code replacements to apply in order
Behavior4/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It discloses the validation rules (no XPath, no bare CSS classes, iframe must use frame.locator), the application step, and the violation-return/retry behavior. It also explains enforcement consequences vs direct edits. However, it does not specify whether partial application occurs or the exact state of the file after a violation, which would improve transparency.

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?

The description is three sentences long and front-loaded with the core purpose. Every sentence earns its place: the first defines the action, the second covers return/retry behavior, and the third emphasizes enforcement. No redundant wording.

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 tool with no output schema and no annotations, this description gives a solid contract: validation rules, application, violation return, and retry directive. It could be more explicit about failure atomicity (whether any changes are applied when violations occur), but overall it is complete enough for an agent to invoke 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?

Schema description coverage is 100%, with each parameter having a meaningful description. The tool description adds context about validation rules but does not provide additional detail on individual parameters beyond the schema. Baseline 3 is appropriate since the schema already does the heavy lifting.

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 clearly states the tool validates proposed code changes against LOCATOR_VIOLATION_RULES and then applies them to a spec file. It distinguishes itself from sibling read/analysis tools by explicitly stating it is the only valid path to write spec changes, making its unique purpose unambiguous.

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?

The description explicitly says 'This is the only valid path to write spec changes; direct file edits bypass LOCATOR_RULES enforcement,' providing a strong directive on when to use this tool. It also instructs the agent to fix and retry if violations are returned, covering the expected follow-up workflow.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BobChochola/E2E-fixer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server