Skip to main content
Glama
vola-trebla

playwright-spatial-layout-mcp

by vola-trebla

verify_spatial_relationships

Validate spatial layout rules on a page, such as 'nav above hero' or 'sidebar left of content'. Returns pass/fail per rule with a human-readable reason.

Instructions

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?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to analyze
rulesYesList of spatial rules to validate
viewportNoViewport size (default: 1280×720)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return behavior ('pass/fail per rule with a human-readable reason'), which is valuable. However, it does not mention edge cases such as missing selectors, rule evaluation order, or error handling, which would be relevant for an agent deciding whether the tool's behavior is predictable.

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 two sentences, front-loaded with the core purpose, and includes concrete examples. There is no redundant or filler content; every sentence earns its place.

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?

The tool has a complex nested input schema and no output schema, but the description compensates by explaining the output format (pass/fail per rule) and giving usage context. The schema handles the structural details, and the description provides the intent. It lacks only peripheral details like handling of invalid selectors or rule limits, which are not critical for selection.

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%, so the schema already documents all parameters. The description adds meaningful examples of rule expressions that illustrate the 'rules' parameter semantics, but it doesn't materially expand on url or viewport. Given the high schema coverage, a baseline 3 is appropriate with slight bonus for the examples.

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 uses a specific verb ('validates') with a clear resource ('spatial layout rules') and provides concrete examples ('nav must be above hero', 'sidebar must be left of content'). It clearly distinguishes this tool from siblings like extract_bounding_boxes or detect_visual_occlusion by focusing on rule verification rather than extraction or detection.

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

Usage Guidelines4/5

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

The description gives an explicit use case: 'Use to answer: does the page layout match the design specification?' This tells the agent when to apply the tool. However, it does not explicitly name alternatives or state when not to use it, though the sibling tools imply other layout-analysis scenarios.

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/vola-trebla/playwright-spatial-layout-mcp'

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