snapshot
Retrieve a tree-structured view of a window's UI, listing interactive elements and their IDs for direct manipulation.
Instructions
Return a tree-structured view of a window's UI.
The primary orient tool in no-vision mode. In vision mode, use it
as a structural complement to screenshot() — cheaper than a
screenshot and gives element IDs directly. Default behaviour: pick
the currently active window, walk its accessibility tree, prune
anonymous structural wrappers, preserve semantic containers (dialogs,
menus, lists, etc.), and emit an indented text view with one line per
interactive element.
Args:
app: Snapshot the given app's active window (or first window).
Case-insensitive.
window_id: Snapshot a specific window by ID.
element_id: Start the tree walk from a specific element instead
of the window root. Use to dig into a container whose
children were not visible in a previous (truncated) snapshot.
To read the text content of a container, use read_text()
rather than snapshot().
all_elements: If true, include every named element — not just
interactive + container roles. Use when the default
filter is hiding something.
max_depth: Maximum tree depth to walk. Defaults to the
configured value (typically 20). Decrease for a faster
overview of a large window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | ||
| window_id | No | ||
| element_id | No | ||
| all_elements | No | ||
| max_depth | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |