Skip to main content
Glama

Fill in a field

ui_set_value

Sets text in a text field, search field, or text area by ID, text, or role, falling back to select-all and typing when direct setting is unavailable.

Instructions

Set the text of a text field, search field or text area (by id, or by text/role), falling back to selecting all and typing.

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": {
      "app": "<app>",
      "value": "<value>"
    },
    "name": "ui_set_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
appYesApp to control: finalcut, motion, logic, mainstage, compressor, pixelmator, keynote, pages, numbers, or any other app name, bundle ID or .app path
roleNoAccessibility role without the AX prefix, e.g. Button, TextField, CheckBox, PopUpButton, MenuButton, Slider, Row, StaticText
textNoText in the element's title, description or value (case-insensitive)
exactNoRequire the whole text to match
frontNoBring the app to the front first. Off by default: apps are driven in the background so the user's screen isn't taken over.
indexNoWhich match to use when several match (0 = first)
valueYes
withinNoOnly search inside this element id from ui_snapshot

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false but destructiveHint=false, and the description adds real behavioral context beyond them by disclosing the "selecting all and typing" fallback, which signals that existing field content is overwritten. That is a meaningful side effect an agent needs. It stops short of 5 because it does not say what happens on failure when no matching field is found.

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 sentence with the primary action front-loaded and the locator strategy in a parenthetical, with no filler. Slightly dense packing of three selection modes into one clause costs a point but nothing is wasted.

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

Completeness3/5

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

This is a mutating tool with 9 parameters and no output schema, so the description should carry more of the burden: it says nothing about failure behavior when no element matches, nor about what is returned after a successful set. The context it does provide about the fallback is valuable, making it adequate rather than complete.

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?

With schema coverage at 78%, the schema already documents app, role, text, exact, front, index, and within. The description contributes the important semantic of how id, text, and role combine into a single locator strategy, but it leaves exact, index, and within to the schema alone. Baseline 3 is appropriate given the schema does most of the work.

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?

States a specific verb and target set: "Set the text of a text field, search field or text area," which tells an agent exactly which element classes it operates on. The locator mechanism ("by id, or by text/role") is also spelled out. It falls short of 5 because the obvious sibling ui_type_text is never mentioned, so the agent gets no explicit discrimination between filling a field and typing text.

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?

Guidance is implied through the locator strategy (id first, then text/role, then a select-all-and-type fallback), which tells the agent how the tool resolves elements. There is no explicit statement of when to prefer this over ui_type_text or ui_batch, and no stated preconditions such as needing a prior ui_snapshot.

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