Skip to main content
Glama

set_element_value

Programmatically set text field or combo box values via UIA ValuePattern for reliable form input. Use narrate:'rich' to confirm application without screenshots or lensId for safety guards and perception feedback.

Instructions

Set the value of a text field or combo box via UIA ValuePattern — more reliable than keyboard_type for programmatic form input. Use narrate:'rich' to confirm the value was applied without a verification screenshot. Pass lensId (from perception_register) to run safety guards (identity stable, foreground, modal) before setting and receive post.perception state feedback without a screenshot. Caveats: Only works for elements that expose ValuePattern; does not work on contenteditable HTML or custom rich-text editors — use keyboard_type for those.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowTitleYesPartial window title
valueYesThe value to set
nameNoElement name/label (partial match)
automationIdNoExact AutomationId of the element
narrateNoNarration level. rich includes UIA or browser state diff when supported.minimal
lensIdNoOptional perception lens ID. Guards (safe.keyboardTarget, target.identityStable) are evaluated before setting, and a perception envelope is attached to post.perception on success.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: reliability advantages over keyboard_type, how 'narrate' parameter affects confirmation behavior, safety guards when using 'lensId', and limitations regarding element types. It doesn't mention error handling or performance characteristics, but covers most critical operational aspects.

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

Conciseness5/5

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

The description is efficiently structured with zero wasted sentences. It front-loads the core purpose, then provides usage guidance, parameter context, and limitations in a logical flow. Each sentence adds distinct value: reliability comparison, narration usage, safety guard explanation, and caveats about element compatibility.

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 a tool with 6 parameters, no annotations, and no output schema, the description provides substantial context about behavior, limitations, and parameter usage. It covers the tool's purpose, when to use it vs alternatives, behavioral characteristics, and parameter semantics. The main gap is lack of information about return values or error conditions, but given the rich parameter guidance and behavioral transparency, it's mostly complete.

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

Parameters4/5

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

With 100% schema description coverage, the baseline is 3. The description adds meaningful context beyond the schema: it explains the purpose of 'narrate' parameter ('to confirm the value was applied without a verification screenshot'), clarifies the role of 'lensId' ('to run safety guards... and receive post.perception state feedback'), and provides caveats about which elements work with this method. This adds significant practical understanding.

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?

The description clearly states the tool's purpose: 'Set the value of a text field or combo box via UIA ValuePattern.' It distinguishes from sibling tools like 'keyboard_type' by specifying it's 'more reliable than keyboard_type for programmatic form input' and explicitly mentions when to use alternatives ('does not work on contenteditable HTML or custom rich-text editors — use keyboard_type for those').

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?

The description provides explicit usage guidelines: it states when to use this tool ('more reliable than keyboard_type for programmatic form input'), when not to use it ('Only works for elements that expose ValuePattern; does not work on contenteditable HTML or custom rich-text editors'), and names the alternative tool ('use keyboard_type for those'). It also includes guidance on optional parameters like 'narrate' and 'lensId'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Harusame64/desktop-touch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server