Skip to main content
Glama

Inspect DOM

dom

Query browser page elements and return metadata, HTML, text, attributes, computed styles, rects, or counts. Supports open shadow roots via '>>>'.

Instructions

Query DOM elements and return metadata, HTML, text, attributes, computed styles, rects or counts. Supports open shadow DOM with the ">>>" separator, e.g. "my-app >>> button".

Input Schema

NameRequiredDescriptionDefault
allNo
refNo
limitNo
tabIdNo
xpathNo
actionNoquery
frameIdNo
timeoutNo
selectorNo
maxLengthNo
propertiesNoCSS properties to return for action="styles".
includeHtmlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies read-only behavior through 'Query' and adds shadow DOM support, but it does not state that it is non-destructive, how timeouts or waiting behave, or whether it can operate across frames and tabs.

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?

The description is two front-loaded sentences with no obvious filler. The second sentence provides a concrete shadow DOM example, though the first sentence could be slightly tightened by grouping return types.

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?

For a tool with 12 parameters, no annotations, no output schema, and very low schema description coverage, the description is far too sparse. It covers the general purpose and shadow DOM syntax but omits critical operational details needed to invoke the tool correctly.

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

Parameters2/5

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

Schema description coverage is only 8%, leaving 11 of 12 parameters undocumented in the schema. The description adds the shadow DOM '>>>' syntax for selector and names the possible action outputs, but it does not explain all, ref, limit, tabId, xpath, frameId, timeout, maxLength, includeHtml, or the default behavior.

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?

The description states a specific verb ('Query') and resource ('DOM elements') and lists the types of return data, so the core purpose is clear. However, it does not explicitly differentiate this tool from sibling inspection tools like evaluate or snapshot, so an agent must infer the boundary.

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?

The description gives no guidance on when to use dom versus alternatives such as evaluate, snapshot, or highlight. It does include a useful shadow DOM selector syntax example, but that is a usage detail rather than a when-to-use rule.

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