Skip to main content
Glama

find_elements

Check which elements a CSS selector matches before acting on them. Retrieve each match's tag, id, class, visible text, href, name, type, and value to pass the correct index.

Instructions

Inspect the elements a CSS selector matches, before acting on them.

Use this to check that a selector hits what you think it does, and to read the index you will pass to click or fill. Returns JSON with each match's tag, id, class, visible text, href, name, type and current value.

Args: tab: Tab index within window 1, or a substring of its URL or title. selector: The CSS selector to inspect. limit: Most elements to describe. Default 20.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabYes
limitNo
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that the tool returns JSON with per-match fields (tag, id, class, visible text, href, name, type, current value) and a default limit of 20. It could mention whether it has side effects, but as an inspection tool, its non-destructive nature is reasonably implied.

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 well-structured and front-loaded with the core purpose, followed by a brief usage note and a concise Args section. It avoids fluff, though the Args section slightly overlaps with schema titles.

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?

Given the tool's moderate complexity and the descriptive return-value explanation, the description is largely complete. It could benefit from noting that it matches all elements matching the selector and does not alter state, but overall it provides the needed context.

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 description coverage is 0%, so the description compensates. It explains tab as a tab index or substring of URL/title, selector as a CSS selector, and limit as max elements with default 20. This adds meaningful guidance beyond the bare 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?

The description clearly states a specific verb and resource: inspect elements matched by a CSS selector. It differentiates itself by emphasizing pre-action validation and reading the index for click or fill, distinguishing it from sibling tools.

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?

It explicitly says when to use: check that a selector hits the right elements and read the index to pass to click or fill. It does not name alternative tools, but the context is clear enough for an agent to decide.

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