Skip to main content
Glama

CSS Stacking Context Inspector

css-stacking-context-inspector
Read-onlyIdempotent

Frontend developers need to understand why an element is visually hidden behind another even when z-index seems correct.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
css_snippetYesRequired. Must contain one or more CSS rules. Trim leading and trailing whitespace. If empty, show a validation error and do not compute results.
html_snippetYesRequired. Must contain HTML markup for the inspected layout. Trim leading and trailing whitespace. If empty, show a validation error and do not compute results.
selected_elementYesRequired. Must be a CSS selector or element reference token that matches at least one element in the provided HTML snippet. If no match is found, return a selection error.
show_paint_orderYesBoolean flag. When true, include a paint order trace. When false, omit the detailed trace but still compute the main layering explanation.
show_stacking_context_chainYesBoolean flag. When true, include the ancestry of stacking context creators from root to selected element. When false, include only the summarized cause.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
likely_fix_hintsNo
paint_order_traceNo
diagnostic_summaryNo
layering_explanationNo
stacking_context_chainNo
clipping_and_containment_warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description adds nothing beyond that: no mention that inputs are validated (empty CSS/HTML produces errors), that no match on selected_element yields a selection error, or what the computation yields. It does not contradict the annotations, but it contributes no behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence, so length is not the problem. But the sentence does not earn its place: it is front-loaded with a user-need framing instead of the tool's function, giving the agent nothing actionable. Brevity here reflects under-specification rather than efficient concision.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, and the schema fully documents the five required inputs. Even so, for a diagnostic tool of this complexity the description omits the core operation entirely, leaving an agent unable to tell what the tool computes or how its output differs from sibling inspectors.

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 all five parameters (including the two boolean toggles for paint order and stacking-context chain) are already fully documented in the schema. The description adds no syntax, format, or semantics beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The sentence describes a developer pain point ('why an element is visually hidden behind another even when z-index seems correct') rather than stating what the tool does. It never supplies an action verb such as analyze, explain, or trace, nor names the resource (stacking contexts / paint order) it operates on. It largely restates the title's domain, so an agent cannot tell what the tool actually returns or does.

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

Usage Guidelines3/5

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

The z-index debugging scenario implicitly signals when the tool is relevant, which is adequate implied usage. However, it gives no explicit when-to-use conditions, no prerequisites, and never distinguishes this tool from the sibling diagnostic tools (e.g., api-breaking-change-diff-viewer, html-duplicate-id-and-aria-reference-checker).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources