Accessibility Find
ax_findFind UI elements in a macOS app's accessibility tree by role, title, value, or AXIdentifier, returning handles for interaction.
Instructions
Bounded breadth-first search over an app's (or one window's) accessibility tree for elements matching role, a case-insensitive title/value substring, and/or an AXIdentifier. Returns elementHandles for ax_invoke/ax_set_value. Requires Accessibility permission.
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": "ax_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Target application pid. Required unless windowHandle is given. | |
| role | No | AX role, e.g. "AXButton", "AXTextField". | |
| maxDepth | No | Defaults to 25. | |
| identifier | No | Exact match against AXIdentifier. | |
| maxResults | No | Defaults to 50. | |
| windowHandle | No | A windowHandle from window_list, to scope the walk to one window instead of the whole app. | |
| titleContains | No | Case-insensitive substring match against AXTitle. | |
| valueContains | No | Case-insensitive substring match against AXValue. |