Skip to main content
Glama

inspector.element

Read-only

Inspect a specific DOM element to retrieve its box model, key computed styles, event listeners, and accessibility role/name for debugging and UI analysis.

Instructions

DevTools Elements panel for one node: box model, key computed styles, event listeners and accessibility role/name.

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": "inspector.element"
  }
}

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.
include_listenersNo
include_accessibilityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful content about what is retrieved (box model, computed styles, listeners, a11y), but says nothing about cost, whether listeners/a11y are opt-in via the boolean flags, or what happens when a locator matches multiple nodes.

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

Conciseness4/5

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

A single dense sentence with the resource stated first and the returned data enumerated after the colon. No filler, though the fragment style leaves no room for the usage or locator guidance an 11-parameter tool needs.

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?

With 11 optional parameters, no required fields, and no output schema, the description should clarify locator selection and return shape. It lists the data categories but not their structure, defaults, or how the two include_* flags change the response.

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 coverage is 82%, so the schema already documents nearly all 11 parameters, making 3 the baseline. The description's mention of event listeners and accessibility role/name loosely maps to include_listeners and include_accessibility, but it adds no guidance on locator precedence (ref vs selector vs xpath vs backend_node_id) or the nth disambiguation.

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?

Names a concrete resource (one DOM node) and enumerates the specific data returned: box model, computed styles, event listeners, accessibility role/name. The phrase "for one node" implicitly separates it from whole-page siblings like inspector.snapshot, but no sibling is named explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no alternative tool is named. An agent must infer from the sibling list whether to use inspector.snapshot, inspector.children, inspector.accessibility_tree, or this tool; the description gives no routing rule.

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