Set a control's text (experimental)
nvda_set_valueSet text in an edit field through its accessibility API instead of typing, without needing focus, then return the value the field holds afterward.
Instructions
Experimental: give an edit field new text through its accessibility API (UI Automation ValuePattern or IAccessible accValue) instead of the keyboard, then report the value it has now.
It needs no focus, so it can reach a field in a background window, found with nvda_find_objects and window. Many web editors (React, Lexical, as in WhatsApp Web) ignore text set this way or lose it on the next key press, so check the reported value; if it did not take, use nvda_focus_object and nvda_type_text. Unlike typing, it cannot be sent to the wrong window when the user moves the focus meanwhile, so prefer it for writing into a field on someone else's computer; never with anything about the user you work for or their computer (text that carries this computer's folders or looks like a key is refused). This counts as controlling the computer, like nvda_type_text.
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": {
"text": "<text>"
},
"name": "nvda_set_value"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | A control from nvda_find_objects. The focused control when left out. | |
| text | Yes | The control's new text, replacing what is there. An empty string clears it. | |
| append | No | Add text after what the control already has instead of replacing it, to write something longer than one call takes. Start a new line with a line break at the start of text. | |
| record | No | Also record what this action changed: how the accessibility tree around it changed (controls added, removed, renamed or moved, values and states) and the events NVDA handled. NVDA is silent for up to a few seconds while the tree is read. For something the user does, use nvda_trace_events with tree. | |
| settle_ms | No | Stop listening once NVDA has been quiet this long. | |
| timeout_ms | No | Stop listening, or waiting for until_speech, after this long in total. | |
| until_speech | No | Keep listening until NVDA says something containing this text (ignoring case), such as 'sent' or a dialog title, instead of stopping at the first pause. The result says whether it was heard. | |
| record_within | No | Record only inside this control, an id from nvda_find_objects, such as a chat's message list. Implies record. By default the web document or window around the action is recorded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |