Skip to main content
Glama
vola-trebla

playwright-spatial-layout-mcp

by vola-trebla

verify_stacking_context

Trace an element's full CSS stacking context chain to diagnose why z-index isn't working and identify which ancestors create stacking contexts.

Instructions

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?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to analyze
selectorYesCSS selector for the element to inspect
viewportNoViewport size (default: 1280×720)
Behavior4/5

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

With no annotations, the description carries the full burden. It transparently explains the tool's behavior: it reveals a chain of ancestors and explains why they create stacking contexts. This goes beyond a simple 'verifies stacking context' and gives insight into the output and purpose. It could have mentioned read-only or error behavior, but as a low-risk analysis tool, this is adequate.

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 core action and output, the second gives concrete usage examples. Every sentence earns its place, and it is front-loaded with the main purpose.

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 three parameters (one nested) and no output schema. The description explains the core output (the chain and reasons) and gives real-world scenarios, which is fairly complete. It does not detail edge cases like element not found or handling of dynamic pages, but for a focused diagnostic tool this is acceptable.

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% coverage of parameter descriptions (url, selector, viewport), so the baseline is 3. The description does not add extra parameter-level detail, but it contextualizes the purpose of the selector and viewport implicitly through the diagnostic use cases.

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 ('Reveals') and resource ('full CSS stacking context chain for an element'), clearly distinguishing it from siblings such as detect_visual_occlusion or compute_viewport_reflow. It also provides concrete diagnostic questions, making the purpose explicit.

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 clearly states when to use the tool ('why is my z-index:9999 element still behind a modal? Does this element create its own stacking context?'), which is strong usage context. However, it does not explicitly mention alternatives or when not to use it, so it stops short of 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