Skip to main content
Glama

dom_query_all

Retrieve properties of all elements matching a CSS selector in a browser tab. Set a limit to control the number of results.

Instructions

Query all elements matching a CSS selector and return their properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of elements to return (default: 50)
selectorYesCSS selector to query
targetIdYesTarget ID of the tab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, but it only states that elements are queried and properties returned. It does not disclose that results are limited (default 50), what properties are returned, result ordering, or error behavior. This leaves important behavioral traits undocumented.

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 with no filler; the core action and object are front-loaded. It is appropriately brief for a simple query tool.

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?

The tool has no output schema and no annotations, so the description must explain return shape and behavior, but it only says 'return their properties' without specifying format or limit. Given the sibling dom_query exists, the description also does not fully disambiguate the multi-element return contract. This is incomplete for reliable invocation.

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?

All three parameters are already described in the schema with 100% coverage, so the baseline is 3. The description adds little beyond restating the selector concept and 'properties' outcome; it does not clarify limit semantics or targetId meaning beyond schema.

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

Purpose5/5

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

States a specific action ('Query all elements') and a clear resource (CSS selector matching DOM elements), and the word 'all' distinguishes it from the sibling dom_query tool. The return of properties is mentioned, though the property set is unspecified.

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

Usage Guidelines4/5

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

The phrase 'all elements' conveys that this tool is for batch/multi-element queries, which distinguishes it from dom_query and other DOM tools. It does not explicitly state when to prefer an alternative or mention exclusions, so some inference is required.

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