glass_a11y_snapshot
Capture the active window's accessibility tree as compact text with element IDs for addressing and interacting with UI elements.
Instructions
Capture the active window's accessibility tree (semantic elements: role, name, description, window-relative bounds) 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; it is display-only, since glass_wait_for_element and glass_scroll_to_element select on name, not description. 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. 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. |