Skip to main content
Glama

Click a button or control

ui_click

Press a UI element by id or by text and role to operate buttons, checkboxes, tabs, rows, and pop-up buttons in dialogs and panels; bring the app to the front for a real click.

Instructions

Press a UI element: by id from ui_snapshot/ui_find, or by text and role (e.g. text "Generate", role "Button"). Use for buttons, checkboxes, tabs, list rows and pop-up buttons in dialogs and panels. A list row is selected through Accessibility; some apps ignore that, so if nothing changes, call again with front: true for a real click.

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>"
    },
    "name": "ui_click"
  }
}

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)
withinNoOnly search inside this element id from ui_snapshot

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnly=false, destructive=false, openWorld=false, which says nothing about how a click is delivered. The description supplies real behavioral insight: apps are driven in the background by default, list rows are selected via Accessibility, and some apps silently ignore that so a foreground click is needed as a fallback — exactly the failure mode an agent must anticipate.

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?

Three tight sentences, front-loaded with the action and locator source, then coverage, then the fallback remedy. Every clause carries either addressing information or a failure-handling rule; nothing is padded.

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 an 8-parameter, single-action tool with no output schema and strong annotation coverage, the description covers addressing, element scope, and the main silent-failure case. It could say more about what happens when several elements match or when nothing matches at all, but the core call path is fully specified.

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 88%, so the baseline is 3. The description adds meaningful linkage the schema does not: it explains where `id` originates and reframes `front` not merely as "bring to front" but as the remedy for a click that produced no visible change, giving that flag a decision rule rather than a label.

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?

Opens with a specific verb and resource ("Press a UI element") and immediately enumerates the two addressing modes: an id sourced from ui_snapshot/ui_find, or text plus role. That locator provenance separates it from the finder/snapshot siblings without requiring the agent to open their schemas.

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?

Gives concrete element coverage ("buttons, checkboxes, tabs, list rows and pop-up buttons in dialogs and panels") and a recovery path when the Accessibility-based row selection does nothing ("call again with front: true"). It stops short of stating when not to use it versus other input tools, so a 4 rather than a 5.

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