Skip to main content
Glama
computer
by zznabil

Set element value

element_set_value
Destructive

Sets an element’s value via accessibility for text fields, sliders, and pickers without keystrokes, with a Windows fallback that types and verifies values when accessibility writes are ignored.

Instructions

Set an element's value through accessibility (text fields, sliders, pickers) without keystrokes. On Windows, the server takes over for a foreground-only write when permitted. If a classic Win32 edit or combo box ignores the accessibility write, it selects and types the value, then reads it back.

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": {
      "ref": "<ref>",
      "value": "<value>"
    },
    "name": "element_set_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from ax_tree/ax_find, e.g. "e12".
valueYesNew value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, openWorldHint=true, idempotentHint=false), the description discloses how the write is performed, that Windows may take over for a foreground-only write, and that classic Win32 edits fall back to select-and-type followed by a read-back. The fallback detail is genuinely useful since it means real keystrokes can be injected and focus may change, though 'when permitted' is left undefined.

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?

Three tight sentences, front-loaded with the primary mechanism before the platform caveat, with no filler. The phrase 'takes over for a foreground-only write when permitted' is slightly vague about who permits what, a minor clarity cost.

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?

With no output schema, the description could say what a successful set returns, but the annotations already convey the safety profile and the description covers mechanism, platform behavior, and fallback. For a two-parameter tool this is close to sufficient; only error conditions and return semantics are unaddressed.

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 coverage is 100%, so both parameters (ref and value) are already documented in the schema and the description adds no format, range, or type detail beyond naming sliders and pickers as targets. Baseline 3 is appropriate when the schema carries the parameter burden.

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

Purpose4/5

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

The description opens with a specific verb and resource ('Set an element's value') and adds the mechanism ('through accessibility') plus the element kinds it covers (text fields, sliders, pickers). It implicitly differentiates itself from keystroke-based siblings by saying 'without keystrokes' but never names them, so the sibling contrast is inferential rather than explicit.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this is the right tool when it wants to write a value without synthesizing keystrokes, and the Windows fallback paragraph hints at when the accessibility path may not be enough. There is no explicit 'use element_type instead when...' guidance or statement of prerequisites, even though element_type exists as a plausible alternative.

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