Skip to main content
Glama
vola-trebla

playwright-spatial-layout-mcp

by vola-trebla

compute_viewport_reflow

Detect layout breakage across viewport sizes by measuring position and size shifts of tracked elements, identifying which elements move most on mobile and desktop.

Instructions

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?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to analyze
selectorsYesCSS selectors to track across viewports
viewportsYesViewport sizes to compare — e.g. [{width:375,height:812},{width:1280,height: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 of behavioral disclosure. It states the core behavior (measuring position/size changes) but does not mention side effects, prerequisites, or output format. The description is not misleading but is somewhat minimal.

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 long, with the first sentence defining purpose and the second providing usage examples. It is front-loaded, concise, and free of unnecessary detail.

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?

Given the tool's moderate complexity, clear input schema, and no output schema, the description covers the main purpose and usage scenarios. It lacks explicit return format details, but the example questions imply the kind of results produced, making it reasonably complete.

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?

The input schema has 100% description coverage for all three parameters (url, selectors, viewports), so the description does not need to add parameter details. The tool description adds no extra parameter context, but the schema already fully documents them, supporting the baseline score of 3.

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 measures element positions and sizes across viewport sizes, which is a specific verb+resource. It distinguishes itself from sibling tools like extract_bounding_boxes or detect_visual_occlusion by focusing on reflow behavior across breakpoints, and it provides concrete example questions.

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 explicit usage guidance with 'Use to answer:' followed by practical questions, indicating when the tool is appropriate. It does not explicitly exclude alternative tools, but the use cases are clear enough to guide selection.

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