glass_a11y_snapshot
Capture the active window's semantic UI as a compact accessibility tree with roles, names, bounds, and states. Use as a low-token element map; for exact value or transition checks, use the wait tool.
Instructions
Capture the active window's current semantic state as a compact accessibility tree (role, name, description, bounded editable value, window-relative bounds and states). This is one observation, not proof of transition completion or visual appearance. For exact runtime verification, call glass_wait_for_element with the element's name, description and/or role, plus value for an exact editable value (value_contains for a substring). The compact value may be unavailable, redacted or truncated; use that wait rather than repeated snapshots when the full queryable value matters. Rendered as compact text — deterministic, low-token element addressing alongside screenshots. Each line is #<id> <Role> "<name>" desc="<description>" (x,y wxh) [states]. desc carries a second label the platform exposes apart from the name, and appears only where one exists and differs from the name; glass_wait_for_element and glass_scroll_to_element can select it with the description parameter. Pass an #id to glass_click_element. Errors if the backend or app exposes no accessibility tree (e.g. a canvas/black-box app) — fall back to glass_screenshot then. Web content arrives under a Document element, and a childless Document is disclosed in its own notice: take a fresh snapshot first, then pixels. A placeholder the app published for content it has not exposed gets its own notice — only pixels reach it. Optional max_nodes: raise the element cap, or 0 to remove the element-count limit (default caps protect the token budget).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_nodes | No | Maximum number of elements to include. Omit for the default cap (protects the token budget). Pass a larger number to raise it, or `0` for the full tree (no limit). A snapshot renumbers ids, so re-read them after changing this. |