Set field value
set_valueReplace a text field's full contents via the accessibility API in one step, without keystrokes. Use for long values or fields that already contain text.
Instructions
Replace a text field's entire contents in one step through the accessibility API, without keystrokes. Prefer it over type_text for long values or when the field already holds text; fall back to click plus type_text if the field rejects it, which the result reports. The previous value is discarded.
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>",
"value": "<value>"
},
"name": "set_value"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | New complete value for the field | |
| element_id | Yes | Text field to set, 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. |