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
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| app | No | ||
| count | No | ||
| force | No | ||
| button | No | ||
| mechanism | No | ||
| timeout_ms | No | ||
| snapshot_id | No | ||
| element_index | No | ||
| screenshot_id | No |