Skip to main content
Glama

mac_click

Clicks a macOS UI element by element index or coordinates, re-identifying it first and using its accessibility action or a physical click to act on the intended control.

Instructions

Click a UI element by element_index (from mac_ax_state / mac_find; valid 30 s; snapshot_id only with it: the snapshot the index came from) or at raw {x,y}. The element is re-identified first (element_no_longer_valid if gone or changed). mechanism auto (default): the element's own accessibility action (press / show menu / select — no pointer, works in background windows) when it has one, else a physical click, sent only if a hit test shows the point reaches the element (occluded otherwise); semantic / physical force one path. count 2-3 and button middle are physical. Under auto a physical click on a native app is posted to its pid (route bgpost: no pointer move; never re-sent another way — no visible change is delivered_unverified with a note, a timeout delivery=unknown); web-engine apps (Chromium/Electron) and mechanism physical use the real pointer (route cliclick), re-checked right before it is sent. A physical click is delivered_verified only if the element is still there, changed, and its window is still on top at the point. A raw {x,y} click is sent only when the window on top at that point belongs to app (default: the frontmost app; the menu bar counts as its) — otherwise occluded names what covers it; force:true skips that check. screenshot_id + x,y: pixels of a mac_screenshot window capture, relative to its top-left corner; a window that moved, resized or was rebuilt since is refused as stale. Results state delivery (delivered_verified / delivered_unverified / not_delivered / unknown) and whether a retry is safe, plus newly opened sheets, dialogs or menus.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mac_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
appNo
countNo
forceNo
buttonNo
mechanismNo
timeout_msNo
snapshot_idNo
element_indexNo
screenshot_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / screenshot_id
      Added value: +{
      +  "type": "string"
      +}
  2. Changed5 schema fields changedv0.2.6
    • addedInput schema / properties / app
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / force
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / mechanism
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / snapshot_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / timeout_ms
      Added value: +{
      +  "type": "integer"
      +}
  3. First observedv0.1.2

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, it discloses re-identification, auto versus semantic/physical pathways, background pid posting versus pointer routing, hit-test/occlusion checks, stale screenshot refusal, delivery states, retry safety, and newly opened UI. This is unusually rich behavioral context and is consistent with readOnly=false, openWorld=true, idempotent=false, and destructive=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, but the remainder is a dense semicolon-and-parenthetical chain that is hard to scan. The complexity justifies much of the detail, yet the structure could be broken into clearer mode, behavior, and result sections.

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 11-parameter click tool with no output schema and no schema descriptions, it explains most paths, validation, delivery outcomes, and retry implications. Remaining gaps are timeout_ms semantics and full button/count value coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description supplies meaning for most parameters: element_index/snapshot_id pairing and 30 s validity, raw x,y, screenshot_id-relative pixels, app default frontmost, mechanism auto/semantic/physical, count 2-3, button middle, and force. It omits timeout_ms entirely and gives only partial semantics for count and button values, so it is strong but not complete.

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 ('Click a UI element') and distinguishes the two targeting modes: element_index versus raw {x,y}. It references mac_ax_state/mac_find and mac_screenshot as sources, but it does not explicitly position itself against sibling click/drag tools such as browser_click or mac_drag.

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?

It states when element_index mode applies (from mac_ax_state/mac_find, valid 30 s, snapshot_id only with it), when raw coordinates apply, and when screenshot_id coordinates are relative to a mac_screenshot capture. It gives defaults for mechanism and app, but lacks an explicit statement of when not to use this tool versus other click or drag alternatives.

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