Skip to main content
Glama

glass_find_elements

Read-only

Find accessibility elements by approximate text, role, or state, returning ranked matches with actionable IDs. Use when target text is duplicated or unidentified.

Instructions

Find a bounded ranked set of accessibility elements from one fresh read. Use this when the target text is approximate, duplicated, or not yet identified; use glass_wait_for_element for one precise runtime condition and glass_a11y_snapshot for broad tree inspection. query is a deterministic case-insensitive substring over accessible name, description and non-secure value; optional role/states narrow targets, optional within must match one semantic scope, max_results defaults to 10 and is capped at 20, max_nodes uses snapshot walk-limit semantics, and positive timeout_ms waits for a match. Returns trusted counts plus one untrusted match array with actionable ids and compact context. Complete success and error text is capped at 8 KiB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoNormalized target role.
queryNoApproximate case-insensitive semantic text. Optional when role or states are supplied.
statesNoTarget state predicates combined with AND.
withinNoOptional unique semantic scope resolved in the same fresh tree.
max_nodesNoExisting accessibility walk limit semantics; 0 removes the node-count limit.
timeout_msNoOptional wait for at least one match; default 0 performs one fresh read.
max_resultsNoMaximum ranked matches before the byte budget; default 10, range 1 through 20.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.5.1

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, but the description adds substantial behavioral context: it performs a single fresh read, returns a bounded ranked set, treats query as deterministic, caps max_results at 20, uses snapshot walk-limit semantics for max_nodes, and caps complete output at 8 KiB. It also discloses the trusted/untrusted nature of returned data. No annotation contradiction is present.

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 earns its place: it front-loads the core behavior, immediately gives routing guidance, then compacts parameter semantics, return shape, and error limits. Despite its length, it avoids repetition and stays organized.

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?

There is no output schema, so the description correctly covers return semantics: trusted counts plus one untrusted match array with actionable ids and compact context. It also covers key constraints like the 8 KiB cap. For a tool with seven optional parameters and rich sibling context, this description provides enough for correct invocation.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description meaningfully extends the schema. It clarifies that query is a deterministic case-insensitive substring over accessible name/description/non-secure value, that within must match one semantic scope, that max_results defaults to 10, that positive timeout_ms waits for a match, and that max_nodes reuses snapshot walk-limit semantics. These details are absent from the schema descriptions.

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 opens with a specific verb and resource: 'Find a bounded ranked set of accessibility elements from one fresh read.' It clearly differentiates this tool from glass_wait_for_element and glass_a11y_snapshot by naming them as alternatives, so an agent can select the right sibling without opening their schemas.

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

Usage Guidelines5/5

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

The description gives explicit selection criteria: use this when target text is 'approximate, duplicated, or not yet identified,' and use glass_wait_for_element for 'one precise runtime condition' or glass_a11y_snapshot for 'broad tree inspection.' This provides both when-to-use and when-not-to-use guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fixed-width/glass'

If you have feedback or need assistance with the MCP directory API, please join our Discord server