Ui Read Tree
ui_read_treeReturns a COMPACT accessibility tree of a running native app's labeled + interactive elements (buttons, links, text fields, checkboxes, menus…) — the native equivalent of web_read's a11y mode. Use it to DISCOVER what to act on in an unfamiliar app when you don't already know an element's role/label (ui_find_element needs one up front). Each interactive node carries a ref you can pass straight to ui_click. Pass app_bundle_id of a running app (e.g. com.apple.finder — see list_windows); the tree is pruned to signal-bearing nodes and bounded by max_depth (default 12) and a node budget, so very large windows return partial. The app's macOS menu bar is skipped by default (it's hundreds of menu-item nodes) — pass include_menu_bar=true if you specifically need to act on menu-bar items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_depth | No | Max tree depth to descend (default 12, max 20) | |
| window_id | No | Alternative to app_bundle_id: a window id from list_windows (targets that window's app) | |
| app_bundle_id | No | Bundle id of a RUNNING app (e.g. com.apple.finder) | |
| include_menu_bar | No | Include the app's macOS menu bar (hundreds of menu-item nodes). Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||