Click in browser
browser_clickSimulates a real mouse click on a page element by snapshot index or coordinates, even in a background tab. Scrolls the element into view and fails if something covers it.
Instructions
Click in one of the agent's tabs, either an element by its index from browser_snapshot (preferred) or a point given in page coordinates. Pass index or x and y, not both; an index can name an element inside a frame, which is pressed at its place on the page. Works on a background tab with real (trusted) mouse input, without selecting the tab or raising its window. An element out of view is scrolled into view first; when something else covers it (a banner, a dialog, another control) nothing is pressed and the call fails, naming what is in front. A checkbox, radio or switch reports what it is now. A tab the click opens (a target=_blank link or a popup) becomes one of the agent's tabs; find it with browser_list_tabs. Use click for native app windows. A click can submit forms or follow links, so snapshot first.
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": {
"tab_id": "<tab_id>"
},
"name": "browser_click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Page x coordinate in CSS pixels, used together with y when no index is given | |
| y | No | Page y coordinate in CSS pixels, used together with x when no index is given | |
| index | No | Element index from the latest browser_snapshot of this tab. Preferred over coordinates. | |
| tab_id | Yes | tab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs | |
| session_id | No | Stable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session. | |
| return_state | No | Append a current snapshot and readiness status after acting. Without wait_for_selector, only a short pause and bounded navigation wait are used; SPA readiness is not guaranteed. Snapshot indices replace earlier ones. A timeout does not mean the action failed: re-observe with browser_snapshot before repeating it. | |
| wait_timeout_ms | No | Bound for wait_for_selector in milliseconds (default 8000, maximum 10000; 0 checks once). Requires wait_for_selector. Timeout preserves action success and returns current state. Use browser_snapshot with the same wait to re-observe without repeating an action. | |
| wait_for_selector | No | Wait for any visible element matching this CSS selector in the page or any of its frames (iframes), including open shadow roots (web components); a timeout says how many frames could not be searched. On actions requires return_state=true. Returns readiness met, timeout or error; only this condition is checked, not general app readiness. Prefer a selector specific to the expected new UI. |