select_text
Select matching text or place the cursor beside it in an observed editable element, then return the updated accessibility state for subsequent agent actions.
Instructions
Not yet supported on Windows. Select matching text, or place the cursor beside it, in an observed editable element. Returns the updated accessibility state after the action; a separate text-only get_app_state is normally unnecessary. Request a new screenshot before later coordinate input.
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": {
"app": "<app>",
"element_index": "<element_index>",
"text": "<text>"
},
"name": "select_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | App name or full app path; macOS bundle ID; macOS and Windows pid:<pid>; Windows process name, window title fragment, or Start-menu shortcut name; Linux desktop entry name, executable name or window title fragment | |
| text | Yes | ||
| scope | No | macOS and Windows: element index from the latest returned state. Read only its retained subtree, renumbered from [1], including after actions. If it disappears, return the whole window with a notice. Linux returns INVALID_ARGUMENT. | |
| prefix | No | ||
| suffix | No | ||
| element_index | Yes | Element index from the latest returned app state | |
| selection_type | No |