Accessibility tree
ax_treeReads a window's OS accessibility tree as line-by-line text with element refs, enabling agents to inspect UI elements before acting on them.
Instructions
OS accessibility tree of a window as text, one node per line: - role "label" [ref=eN]: "value" plus states. Refs stay valid across reads until the element's role/label changes; a ref missing from the last two reads throws StaleRef (re-read, never guess).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>"
},
"name": "ax_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Include nodes normally pruned as uninteresting. | |
| target | Yes | Window id from list_windows, "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard. | |
| maxDepth | No | Maximum tree depth. | |
| maxNodes | No | Maximum node count. |