Skip to main content
Glama

dom

Query page elements by CSS selector on iOS Safari and return tag, text, attributes, position, visibility, outer HTML, or text for inspection and automated testing.

Instructions

Query the DOM by CSS selector. what=info (default: tag, text, attributes, rect in CSS px, visible), html (outerHTML) or text.

Input Schema

NameRequiredDescriptionDefault
pageNoindex in inspector_pages; default the first page with a real address
waitNoseconds to wait for the page list, default 60
whatNo
limitNo
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior3/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. 'Query' implies read-only and the description usefully enumerates the info payload (tag, text, attributes, rect in CSS px, visible) and that html returns outerHTML, which is real behavioral context. However, it says nothing about whether it returns the first match or all matches, selector-miss behavior, or how page/wait affect execution.

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?

Two dense sentences, front-loaded with the verb and resource, followed by the mode enumeration. No filler, though the parenthetical mode list is slightly run-on and could be more scannable.

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?

With five parameters, zero required, no annotations, and no output schema, the description should explain result shape and matching semantics. It partially does for info/html/text, but leaves limit, multi-match behavior, and empty-result behavior entirely unaddressed—gaps an agent will hit on first call.

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 40%: page and wait are documented in the schema, the what enum is listed but the description adds genuine meaning for each mode and its default fields. selector is only implied by 'by CSS selector,' and limit is completely undocumented in both schema and description, leaving its meaning (match cap? byte cap?) unresolvable.

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 verb and resource: 'Query the DOM by CSS selector.' An agent knows this reads page markup, not that it runs arbitrary script (js) or dumps raw inspector data (inspector_raw). It stops short of naming or contrasting those overlapping siblings, which keeps it from a 5.

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?

No when-to-use or when-not guidance, and no routing among the many overlapping siblings (js, inspector_raw, tap_css, tap_element). Usage is only implied by the phrase 'by CSS selector'; an agent must infer that this is the read-only DOM inspection path.

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