ui_click
ui_clickClick a specific webpage element by CSS selector or captured page-state selector, with options for right/middle clicks, double-clicks, modifier keys, offsets, and forcing clicks through overlays.
Instructions
Click the single element matching the given selector. The selector may be a CSS selector or the selector value from ui_get_page_state, passed unchanged. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them. Optional: button (right/middle), clickCount 2 for a double-click, modifiers for Shift/Control-click, position for an offset inside the element, force to click through an element covering it. If the click opens a native alert/confirm/prompt, the reply says the browser is waiting: answer it with ui_dialog.
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": {
"selector": "<selector>"
},
"name": "ui_click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Skip the check that nothing covers the element (e.g. a transparent overlay); the click lands on whatever is on top | |
| button | No | Mouse button (default left); right fires contextmenu | |
| position | No | Click this offset from the element's top-left corner, in CSS pixels (default: its centre) | |
| selector | Yes | CSS selector, or the `selector` value of an element from ui_get_page_state | |
| modifiers | No | Keys held during the click, e.g. ["Shift"] for a range select | |
| clickCount | No | 2 = double-click, 3 = triple-click (default 1) | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |