MCP server for CSS no-op detection via Playwright
The server defines 3 tools with basic schemas and descriptions. Naming follows verb-noun convention (list_, analyze_, scan_) which is good. However, descriptions are generic and lack depth, they do not explain WHEN to use each tool, what the outputs look like, or how they differ from each other. Parameter descriptions are minimal. Error handling returns JSON with an 'error' field, but does not guide the LLM on recovery steps or classify errors. Output schemas are not documented, it's unclear what fields list_rules returns, or what the structure of analyze_element/scan_page results look like. The server validates URLs and handles browser lifecycle, but these operational details are not reflected in tool descriptions or error guidance.
Analyze a specific element on a page for CSS no-op violations
List all available CSS no-op detection rules
Scan all elements on a page for CSS no-op violations
Output schemas are not documented. The LLM cannot see what fields list_rules, analyze_element, or scan_page will return, making it impossible to plan downstream processing or extract the right data.
Descriptions are too generic and lack actionable guidance. 'List all available CSS no-op detection rules' does not explain WHEN to call this vs. analyze_element/scan_page, what format the rules are in, or how to use the output. 'Analyze a specific element' does not describe what violations look like or when to use it instead of scan_page.
Error handling does not guide recovery. The mcpError() function returns a JSON blob with an 'error' key, but does not categorize errors (retryable vs. user-fixable vs. fatal) or suggest next steps. For example, browser launch failure suggests 'npx playwright install chromium', which is good, but malformed URLs, network timeouts, and Playwright failures are all lumped into generic 'Failed to...' messages.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | 2026-07-28+ | v2 |
Parameters lack detailed descriptions explaining constraints and expected format. The 'selector' parameter has a description and maxLength constraint, but 'url' only says 'URL of the page to analyze (http/https only)', it does not explain what happens if the page is not accessible, redirects, requires authentication, or times out. The selector parameter does not clarify CSS selector syntax or what happens if the selector matches multiple elements.
No documentation of output structure for analyze_element and scan_page. The source imports from '../../src/rules/engine.ts' and '../../e2e/helpers/extract-element-data.ts', but the actual return shape (list of violations? violation objects with id/label/properties?) is not visible in the provided code. LLMs cannot infer this from function calls alone.