Find elements
ax_findSearch a window's accessibility tree by role, title, or value to locate UI elements and get their refs and desktop bounds. Scope searches to a container for faster results in large windows.
Instructions
Query a window's AX tree by role/title/value; returns element records with refs and global desktop bounds. title and value match substrings (case-insensitive); exact matches come first, and exact: true returns only those.
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_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Role, e.g. button, textfield. | |
| exact | No | Only elements whose whole title/value equals the given text (case-insensitive, trimmed). | |
| limit | No | Max results. | |
| title | No | Label (substring). | |
| value | No | Value (substring). | |
| target | Yes | Window id from list_windows (a "window:<id>" prefix is accepted), "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard. | |
| within | No | Ref of a container (from ax_tree/ax_find) to search instead of the whole window. Much faster in big windows: cost grows with the container's size, not the window's. |