Skip to main content
Glama
computer
by zznabil

Set element value

element_set_value
Destructive

Set a UI element's value directly through accessibility—text fields, sliders, pickers—without typing keystrokes. Provide the element ref and new value.

Instructions

Set an element's value through accessibility (text fields, sliders, pickers) without keystrokes.

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.5/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, idempotentHint=false and openWorldHint=true, and the description adds genuinely non-obvious context: the value is written via the accessibility API rather than synthetic key events, so keyboard handlers won't fire. It does not say that existing content is replaced, that the change is not undoable, or how apps lacking accessibility value support behave.

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?

A single front-loaded sentence with no filler; the parenthetical examples earn their place. It is lean to the point of under-specifying usage, but there is no wasted wording.

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 two-parameter tool with full schema coverage, no output schema, and annotations carrying the safety profile, this is nearly sufficient. The remaining gap is failure-mode guidance for elements that expose no accessibility value, which matters for a destructive write.

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% with only two parameters, both fully documented (ref origin from ax_tree/ax_find, value as string or number). The description's mention of sliders and pickers loosely implies when a number versus a string is expected but adds no format or range detail beyond the schema. Baseline 3 applies.

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?

Specific verb+resource ('Set an element's value') plus the mechanism ('through accessibility') and the widget classes it targets ('text fields, sliders, pickers'). That mechanism phrasing implicitly separates it from keystroke-based siblings like element_type or press_keys, though no sibling is named outright.

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?

'Without keystrokes' hints at when to prefer this over typing, but the choice is never made explicit: there is no statement of when to use element_type/element_click instead, and no precondition like 'requires the element to expose an accessibility value.'

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