Select text
select_textSelect a character range inside a text element through the accessibility API to copy or replace part of a value without modifying the text.
Instructions
Select a character range inside a text element through the accessibility API, for example to copy part of a value or to replace just that part with type_text. Defaults to selecting from start to the end of the value. Use set_value to replace the whole value instead. Only the selection changes; the text is not modified.
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": {
"element_id": "<element_id>"
},
"name": "select_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | Zero-based character offset to start the selection at (default 0) | |
| length | No | Number of characters to select (default: through the end of the value) | |
| element_id | Yes | Text element to select in, from get_app_state | |
| state_query | No | With return_state, list only elements whose role, label or value contains this text, like get_app_state's query | |
| return_state | No | After acting, wait for the app to finish reacting (up to 2 s) and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id. |