accessibility
START HERE to see and drive a window by element name (the OS accessibility tree). Pick an action: read_tree, find, get_element, focused, invoke, focus, set_value, get_value, expand, collapse, toggle, select, state, list_children, wait_for…
Instructions
START HERE to see and drive a window by element name (the OS accessibility tree). Pick an action: read_tree, find, get_element, focused, invoke, focus, set_value, get_value, expand, collapse, toggle, select, state, list_children, wait_for, compile_ui, find_button, find_field, smart_click, smart_type, smart_read. read_tree / find list one line per element: [Role] "name" @x,y w×h — act on it with invoke + name; @x,y only for elements with no name. If invoke does not find the name, use smart_click with target = the label you can see: it finds the text by OCR and clicks it, with no screenshot. smart_type (target, text) does the same for typing. For sparse/ambiguous UIs: compile_ui fuses a11y+OCR into one ranked map with stable ids; find_button/find_field return an {element_id, snapshot_id} to pass to invoke/set_value. invoke, set_value, toggle and select change the app: before an irreversible one the user did not ask for (Send, Delete, Pay), ask with system pause_for_user.
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": {
"action": "<action>"
},
"name": "accessibility"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "replace" (default with a target): replace the field's text (select-all inside a one-line field only). A document or text area keeps its text and gets the text at the cursor unless "replace" is passed. "append": type at the cursor, keeping the content (default without a target). | |
| name | No | Element name to search for | |
| text | No | The text to type | |
| limit | No | How many elements to list (default 60) | |
| scope | No | Read scope: "focused" for focused element, "window" for active window, "screen" for full screen | |
| value | No | Value for set-value action | |
| action | Yes | Which sub-action to perform. See this tool's description for the enum of valid values. Required: get_element/focus/get_value/expand/collapse/toggle/select/state/list_children: name; set_value: value; find_button: intent; find_field: purpose; smart_type: text. | |
| expect | No | Checks run after the action; a failed check returns DEVIATION. Example: [{"type":"window_title_contains","value":"Inbox"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed. | |
| intent | No | What you want to do (submit/cancel/search/login/...) | |
| offset | No | Skip this many elements — page past "… +N more" (default 0) | |
| target | No | Element name/text to click (e.g., "Send", "Submit", "New Email"). Alias: "name". | |
| within | No | Of several elements with that name, the one inside the window or dialog whose name contains this (as an ambiguous list names it) | |
| purpose | No | find_field: what the field is for, e.g. "email". compile_ui: general | find_text | act. | |
| timeout | No | Max time in ms (default 5000) | |
| max_cost | No | Hard ceiling on perception cost (default ocr_ok) | |
| processId | No | Optional: limit to a specific process | |
| timeoutMs | No | Default 5000 | |
| element_id | No | Target a compiled element from compile_ui (requires snapshot_id) | |
| intervalMs | No | Default 250 | |
| parentName | No | Alias for "name". Accessibility name of the parent element | |
| controlType | No | UI Automation control type. Either form works: "Button" or "ControlType.Button". An unrecognized type returns no results rather than silently searching unfiltered. | |
| maxChildren | No | Cap on children returned | |
| snapshot_id | No | The compile_ui snapshot the element_id came from (requires element_id) | |
| target_text | No | If set and absent from a11y, pull OCR to find it | |
| automationId | No | Automation ID |