Skip to main content
Glama
nvda-mcp server

nvda-mcp server

by InfiArtt

Set a control's text (experimental)

nvda_set_value
Destructive

Set 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

NameRequiredDescriptionDefault
idNoA control from nvda_find_objects. The focused control when left out.
textYesThe control's new text, replacing what is there. An empty string clears it.
appendNoAdd 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.
recordNoAlso 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_msNoStop listening once NVDA has been quiet this long.
timeout_msNoStop listening, or waiting for until_speech, after this long in total.
until_speechNoKeep 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_withinNoRecord 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.0
    • addedInput schema / properties / append
      Added value: +{
      +  "default": false,
      +  "description": "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.",
      +  "title": "Append",
      +  "type": "boolean"
      +}
  2. First observedv1.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructiveHint=true and openWorldHint=true but say nothing about mechanics; the description supplies them: no focus required, works on background windows, may be silently ignored by React/Lexical editors, the reported value must be verified, and certain inputs are refused outright. It also repeats the safety framing ('counts as controlling the computer, like nvda_type_text'), which reinforces rather than contradicts the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the experimental label and the core mechanism, and every sentence carries operational content (caveat, fallback, safety rule). The long middle sentence about focus and the remote-use case is syntactically tangled and could have been split without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, open-world, destructive tool this covers what matters: mechanism, verification requirement, fallback, and safety boundaries, and an output schema exists so return shape need not be described. It stops short of tying the listening-related parameters (record, settle_ms, timeout_ms, until_speech) to the described behavior, leaving that entirely to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains id, text, append, record, settle_ms, timeout_ms and until_speech in detail. The description only indirectly touches parameters (pointing at nvda_find_objects and the window for locating a field) and adds no semantics beyond the schema, so the baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ('give an edit field new text through its accessibility API (UI Automation ValuePattern or IAccessible accValue) instead of the keyboard') and explicitly contrasts itself with the sibling nvda_type_text. An agent can separate it from typing tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the fallback path explicitly: if web editors ignore the set value, 'use nvda_focus_object and nvda_type_text'. It also gives a positive selection rule ('prefer it ... for writing into a field on someone else's computer') and hard exclusions ('never with anything about the user you work for or their computer'), which is unusually complete routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.