glass_find_elements
Find ranked accessibility elements from a single fresh read when the target text is approximate, duplicated, or unknown. Filter by role, state, and semantic scope, then act on the returned IDs.
Instructions
Find ranked accessibility candidates from one fresh read when the target is approximate, duplicated, or not yet identified. Query matches name, description and non-secure value; within must match one semantic scope. max_results defaults to 10, capped at 20; timeout_ms optionally waits. Returns actionable IDs, compact context and explicit truncation in an untrusted match array. Total text is capped at 8 KiB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Normalized target role. | |
| query | No | Approximate case-insensitive semantic text. Optional when role or states are supplied. | |
| states | No | Target state predicates combined with AND. | |
| within | No | Optional unique semantic scope resolved in the same fresh tree. | |
| max_nodes | No | Existing accessibility walk limit semantics; 0 removes the node-count limit. | |
| timeout_ms | No | Optional wait for at least one match; default 0 performs one fresh read. | |
| max_results | No | Maximum ranked matches before the byte budget; default 10, range 1 through 20. |