Skip to main content
Glama
vola-trebla

playwright-spatial-layout-mcp

by vola-trebla

extract_bounding_boxes

Retrieve bounding boxes for DOM elements to determine their exact screen position, size, z-index, and visibility within the viewport.

Instructions

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?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to analyze
viewportNoViewport size (default: 1280×720)
selectorsYesCSS selectors or Playwright locator strings
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It clearly discloses what the tool returns (geometric position, size, z-index, viewport visibility) and implies a read-only operation, but it does not discuss edge cases such as missing selectors or default viewport behavior. Still, it gives a solid, non-misleading picture of the tool's behavior.

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: the first states the tool's function, and the second provides example use cases. Every sentence earns its place with no redundancy or filler.

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 three parameters (two required) and no output schema, the description gives enough context for an agent to select it appropriately. It clarifies the data returned (position, size, z-index, visibility) and the use case, though it does not specify the exact return format. Overall, it is sufficient for effective selection and invocation.

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 schema describes all 3 parameters with 100% coverage, so the description adds no extra parameter-level detail. The mention of 'one or more DOM elements' aligns with the selectors array, but there is no added syntax or format guidance beyond the schema. Baseline 3 is appropriate.

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 returns geometric position, size, z-index, and viewport visibility for DOM elements. This specific verb+resource distinguishes it from sibling tools like detect_visual_occlusion or verify_stacking_context, which focus on different analyses.

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 provides concrete example questions ('where exactly on screen is this element?', 'Is it visible?', 'Is it off-screen?') that signal when to use this tool. However, it does not explicitly mention alternative tools or exclusion criteria, so it lacks the explicit when-not-to-use guidance needed for a 5.

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