Skip to main content
Glama
mcp-server-macos

mcp-server-macos

Set an element's value

set_ui_element_value
DestructiveIdempotent

Set a UI element's value by replacing text field content or changing a slider position; when the app refuses or a web form doesn't notice, focus the element and type instead.

Instructions

Set what an element holds: a text field's text, replacing it, or a slider's position. When the app refuses, or a web form doesn't notice, focus_ui_element and type_text instead.

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": {
      "id": "<id>",
      "value": "<value>"
    },
    "name": "set_ui_element_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it.
valueYesText for a text field (it replaces what's there), a number for a slider.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered; the description reinforces the destructive behavior with 'replacing it' and adds genuinely new behavioral context by naming the failure mode and the recovery tools. It doesn't mention permission or focus requirements, which keeps it short of a 5.

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?

Two sentences, no waste: the primary action and the value types come first, the fallback guidance second. Every clause earns its place.

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 an output schema present, return values needn't be explained, and annotations plus a 100%-documented schema cover the rest. The only thing an agent might still want is whether focus is required before the call, which is left implicit.

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% and both parameters are fully described there, including the same text-field/slider mapping. The description adds no type coercion, formatting, or edge-case detail beyond the schema, so the baseline 3 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 specific verb and effect ('Set what an element holds') and enumerates the concrete cases: a text field's text or a slider's position. That is enough for an agent to distinguish it from type_text or press_ui_element without opening the schema.

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

Usage Guidelines4/5

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

The second sentence gives an explicit fallback path: when the app refuses or a web form doesn't register the change, use focus_ui_element and type_text. It doesn't spell out that this is the preferred tool over type_text for standard inputs, but the default/fallback relationship is inferable.

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