Read accessibility tree
get_app_stateRead an app's accessibility tree as an indented outline with interactive element ids to target clicks, typing, and scrolls. Use it before interacting and again after UI changes to keep ids valid.
Instructions
Read an app's accessibility tree as an indented outline in which interactive elements carry ids like [e12] that click, type_text, set_value, scroll, hover and select_text accept. Use it instead of screenshot whenever you intend to act: it is far cheaper in tokens and gives exact targets. Call it before interacting and again after the UI changes, because ids are per-snapshot and a stale id fails. Read-only; it describes the app's visible windows and does not change focus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | App name, bundle id, or pid exactly as reported by list_apps | |
| query | No | Only list elements whose role, label or value contains this text (case-insensitive). Ids stay valid. Use it instead of raising max_elements when you know what you are looking for. | |
| max_depth | No | Maximum nesting depth to descend (default 18). Lower it for a quick overview of a large window. | |
| max_elements | No | Maximum elements to emit before the outline is truncated (default 800). Prefer `query` over raising this. |