Accessibility tree
nvda_get_object_treeReturns the accessibility tree NVDA sees as an indented outline of roles, names, values, and states, so you can survey a window's layout or find controls keyboard focus cannot reach.
Instructions
Return the accessibility tree NVDA sees, as an indented outline of role, name, value and states.
Use it to survey a window's layout or find controls that keyboard focus cannot reach.
Unnamed layout containers (sections, panels, groupings) are skipped and their children shown in
their place. In browsers and Electron apps, 'foreground' starts from the web document.
Long lists are cut to max_children items with a note saying how many were left out: the items around
the focus when it is in the list, otherwise the last items of lists and tables (the newest messages of a chat) and the first items of anything else, such as menus. Large windows are cut off at max_nodes or after 3 seconds; the result says so. If it is truncated, start from a control (id) or the 'focus' instead, or lower max_depth. To look for one control, nvda_find_objects is faster.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "nvda_get_object_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Instead of root, start from this control, an id from nvda_find_objects. | |
| root | No | Where to start: 'foreground' window (default), the 'focus', or the 'navigator' object. | foreground |
| window | No | Instead of root, start from this window, a handle from nvda_list_windows, even if it is in the background. In browsers and Electron apps it starts from the web document. | |
| max_depth | No | How many levels below the root to include. | |
| max_nodes | No | Stop after this many objects. | |
| max_children | No | Show at most this many children of each object, so long lists do not crowd out the rest. 0 shows all. | |
| response_format | No | 'markdown' (default) is easier to read; 'json' keeps every field for further processing. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |