Click element
element_clickClicks UI elements by accessibility reference without a screenshot, supporting menu selection, double/right/middle clicks, modifier keys, and optional window takeover for reliable input.
Instructions
Click an element by ref (no screenshot needed). On Windows, Chromium content such as WebView2 needs takeover and a pointer point that hits the element. Gecko supports background clicks at a point verified against the element. Other covered controls can use an accessibility press for a plain left 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": {
"ref": "<ref>"
},
"name": "element_click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Element ref from ax_tree/ax_find, e.g. "e12". | |
| menu | No | Menu item path to choose in the menu this click opens, e.g. ["Add to", "Fonts"]. | |
| count | No | Click count, e.g. 2 for a double click. | |
| button | No | "left" (default), "right" or "middle". | |
| takeover | No | Omit to follow the plugin setting ("prefer" uses real input first, "fallback" tries background input first, "refuse" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input. | |
| modifiers | No | Modifier keys held during the click, e.g. ["shift"]. |