Click
clickActivates a UI element by element ID or screen coordinates, performing real app actions and optionally returning updated state for verification.
Instructions
Click an element by element_id (preferred: it uses the accessibility press action, so it works even when the element is scrolled out of view) or at absolute screen coordinates taken from a screenshot or zoom. Pass element_id or x and y, not both. When element_id is clicked by position (web content, or no press action), the point is checked with the app's own hit test first, and the element is scrolled into view if needed; if something else is there the call fails without clicking. A checkbox or radio button says what it is now, and a click that left it unchanged is reported as an error. Use browser_click for pages in the agent's Chrome tabs, right_click for context menus, and drag for press-move-release. The click reaches the target app for real and can trigger any action the user could, so read the target with get_app_state first. The agent's own pointer overlay moves to the target. On macOS the user's mouse pointer never moves; on Windows and Linux a target that ignores background input gets real mouse input, which moves the user's pointer, and the result then says via cursor.
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": "click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Screen x coordinate in points, used together with y when no element_id is given | |
| y | No | Screen y coordinate in points, used together with x when no element_id is given | |
| element_id | No | Element id from the most recent get_app_state snapshot, e.g. e12. Preferred over coordinates. | |
| click_count | No | 1 for a single click (default), 2 for a double-click | |
| state_query | No | With return_state, list only elements whose role, label or value contains this text, like get_app_state's query | |
| return_state | No | After acting, wait for the app to finish reacting (up to 2 s) and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id. |