Click a button or control
ui_clickPress 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| app | Yes | App to control: finalcut, motion, logic, mainstage, compressor, pixelmator, keynote, pages, numbers, or any other app name, bundle ID or .app path | |
| role | No | Accessibility role without the AX prefix, e.g. Button, TextField, CheckBox, PopUpButton, MenuButton, Slider, Row, StaticText | |
| text | No | Text in the element's title, description or value (case-insensitive) | |
| exact | No | Require the whole text to match | |
| front | No | Bring the app to the front first. Off by default: apps are driven in the background so the user's screen isn't taken over. | |
| index | No | Which match to use when several match (0 = first) | |
| within | No | Only search inside this element id from ui_snapshot |