playwright-spatial-layout-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| extract_bounding_boxesA | Returns the geometric position, size, z-index, and viewport visibility for one or more DOM elements. Use to answer: where exactly on screen is this element? Is it visible? Is it off-screen? |
| detect_visual_occlusionA | Checks if one element physically overlaps another by computing the intersection of their bounding boxes. Use to answer: is this button hidden under a sticky header? Does the cookie banner block the CTA? |
| verify_spatial_relationshipsA | Validates a set of spatial layout rules — e.g. 'nav must be above hero', 'sidebar must be left of content'. Returns pass/fail per rule with a human-readable reason. Use to answer: does the page layout match the design specification? |
| compute_viewport_reflowA | Measures how element positions and sizes change across multiple viewport sizes. Use to answer: does the layout break on mobile? Which elements shift most when resizing? |
| calculate_perceptual_contrastA | Measures color contrast between a text element and its background using both WCAG 2.x and APCA (WCAG 3.0 draft) formulas simultaneously. Use to answer: does this text pass accessibility contrast requirements? Is it actually readable even if it technically passes the legacy formula? |
| verify_stacking_contextA | Reveals the full CSS stacking context chain for an element — which ancestors create new stacking contexts and why. Use to answer: why is my z-index:9999 element still behind a modal? Does this element create its own stacking context? |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool targets a distinct spatial layout concern: geometric extraction, occlusion, rule validation, responsive reflow, contrast, and stacking context. There is no meaningful overlap between their purposes.
All tool names follow the same verb_noun pattern in snake_case (extract_bounding_boxes, detect_visual_occlusion, verify_spatial_relationships, compute_viewport_reflow, calculate_perceptual_contrast, verify_stacking_context). The two 'verify' tools differ clearly in their object.
Six tools is well-scoped for a spatial layout analysis server. Each tool addresses a clear aspect of layout inspection without redundancy or bloat.
The tool surface covers the core spatial layout domain: geometry, overlap, relationship rules, responsive behavior, color contrast, and stacking contexts. No significant gaps are apparent for the stated purpose.