Skip to main content
Glama

page_find

Locate elements on a page by visible text, ARIA role, or CSS selector, returning stable refs for subsequent click or type actions. Searches interactive elements by default; enable includeNonInteractive to target all.

Instructions

Find elements on the page by visible TEXT, ARIA ROLE, and/or a CSS SELECTOR, returning each match with a stable ref (e1, e2, ...) for page_click/page_type/etc — the targeted alternative to page_snapshot's full listing. Give at least one of text/role/selector; they AND together. Searches interactive elements by default; set includeNonInteractive:true to search all elements (e.g. to find a heading or price by text). Refs from a prior snapshot/find are invalidated by this call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoARIA role to match, explicit or implicit — e.g. button, link, textbox, checkbox, combobox
textNocase-insensitive substring to match against an element's visible/accessible text
limitNomax matches to return (default 30)
selectorNoraw CSS selector to match (escape hatch; narrows the search base)
sessionIdNo
includeNonInteractiveNoalso search non-interactive elements (default: interactive only). Ignored when selector is given

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does substantial work: it discloses stable ref generation, invalidation of prior refs, AND semantics across criteria, interactive-only default behavior, and the opt-in for non-interactive elements. It also notes the selector-based escape hatch and how refs are consumed by later tools.

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?

The description is dense but every sentence contributes: operation, return contract, differentiation, criterion constraints, default behavior, and invalidation side effect. It is front-loaded with the core purpose and avoids filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no annotations and no output schema, the description is complete enough for correct invocation: it covers what the tool returns, how refs are used, the input constraints, default scope, and the important side effect that prior refs are invalidated. Operational details like limit defaults and case-insensitivity are already in the schema.

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 coverage is 83%, so the schema already documents most parameters. The description adds meaningful relationship semantics: text/role/selector AND together, at least one is required, includeNonInteractive is appropriate for non-interactive targets. It does not clarify sessionId, but that seems like a standard cross-tool parameter.

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 names a specific verb and resource ('Find elements on the page') and clearly distinguishes the tool from page_snapshot as the targeted alternative. It also states the return concept (stable refs) and how the tool fits with sibling actions like page_click/page_type.

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 calls out page_snapshot as the full-listing alternative and says this is the targeted choice. It gives the key usage constraint (supply at least one of text/role/selector) and explains when includeNonInteractive is appropriate, though it does not enumerate all sibling alternatives or exclusions.

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