Skip to main content
Glama

css.explain_visibility

Read-only

Diagnose why an element is hidden by checking its styles and ancestors for display, visibility, opacity, zero size, clipping, and occluders, then identify the culprit.

Instructions

Answers "why can I not see this?" by checking the element and every ancestor for display, visibility, opacity, zero size, clipping and occluders, and naming the culprit.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "css.explain_visibility"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textNoVisible text of the element.
xpathNoXPath expression.
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true and openWorldHint=true, so the description carries most of the behavioral burden, and it does well: it discloses the traversal strategy (element plus every ancestor) and the specific categories of causes examined. What it omits is the output shape — whether it returns a single culprit, a list of findings, or per-check details.

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?

A single sentence that front-loads the user-facing question, then immediately explains the mechanism and the promise ("naming the culprit"). No filler, no restatement of the tool name.

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 read-only diagnostic with no output schema, the description gives enough for an agent to know what question the tool answers and how it investigates. The main remaining gap is the return format — what exactly "naming the culprit" looks like — which matters when the agent must decide whether to call this or css.computed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all nine locator parameters, which sets a baseline of 3. The description adds value by indicating that the analysis works on a located element and its ancestor chain, implying that any of the locator strategies (ref, selector, xpath, backend_node_id) is acceptable input for that same analysis.

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

Purpose4/5

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

States a specific question it answers ("why can I not see this?") and a concrete mechanism: checking the element and every ancestor for display, visibility, opacity, zero size, clipping, and occluders. It clearly distinguishes itself from style-reading siblings like css.computed, though it never names an alternative explicitly.

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?

Usage is implied by the framing question — call this when an element exists but isn't visible — which is a meaningful context cue. However, there is no explicit when-not guidance, no mention of prerequisites (e.g., needing a snapshot or that a browser target must be running), and no named alternative for related questions such as full computed style inspection.

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

Deploy Server

Other Tools