Skip to main content
Glama
vola-trebla

playwright-spatial-layout-mcp

by vola-trebla

detect_visual_occlusion

Determine if one element overlaps another by comparing bounding boxes, revealing whether a button is hidden under a sticky header or a cookie banner blocks a call-to-action.

Instructions

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?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to analyze
viewportNoViewport size (default: 1280×720)
target_selectorYesThe element that might be occluded (e.g., the button)
overlay_selectorYesThe element that might be on top (e.g., the sticky header)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the core method (bounding box intersection), but does not mention important limitations such as ignoring z-index, opacity, or stacking context, nor does it describe the return format or any side effects. This is a moderate disclosure.

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: the first states the function and method, the second provides examples. It is concise, front-loaded, and contains no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should ideally explain the return value, but it doesn't specify whether it returns a boolean, ratio, or other result. It also omits any mention of the viewport parameter's role, though the schema covers that. Overall, the description covers purpose and examples but leaves some operational details undefined.

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 provides 100% coverage of all parameters, including nested viewport properties. The description only reinforces the role of target_selector and overlay_selector via examples, adding no new semantic meaning. Baseline 3 applies because the schema handles parameter documentation.

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 action ('checks if one element physically overlaps another') and the method ('computing the intersection of their bounding boxes'). It provides concrete example questions ('is this button hidden under a sticky header? Does the cookie banner block the CTA?'), which distinguishes it from sibling tools by focusing on overlap/occlusion.

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 clear context with practical scenarios, indicating when the tool is appropriate (e.g., for sticky header and cookie banner issues). However, it does not explicitly name alternatives or state when not to use the tool, so it falls short of full usage guidance.

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