click
Simulates a trusted mouse press in the active tab using a CSS selector, viewport coordinates, or a plain-language target, firing page handlers and enabling popups reliably.
Instructions
Click in the session's active tab with real CDP mouse input (trusted events — fires handlers reliably and grants user activation, so it can open popups/new tabs that a JS click can't). Pass a CSS selector to click the first match's center, after waiting up to timeout for it and scrolling it into view. Plain language works too: a jev: prefix (e.g. jev: the login button) goes straight to the Jev decision model, and with TYPESAFE_API_KEY configured on the server any selector that matches nothing as CSS is retried as a plain-language goal the same way — the server sends the page's interactive elements to Jev, which picks one (on low confidence or any Jev problem it errors instead of guessing, so nothing is clicked blindly; elements are picked from the page as it is at call time, so wait_for content first if the page is still loading). Or pass both x and y to click viewport coordinates, which are used only when there is no selector. Don't use evaluate to click: synthetic JS clicks can be ignored by pages. Coordinates outside the viewport are not rejected; the click lands on nothing. A click can submit forms or trigger purchases, like a real user's. Returns a confirmation naming what was clicked, and rejected: fields the page refused during the click with their messages (a required field left empty, or the page's own error text), when a form wasn't sent. Fails if the selector matches nothing within timeout and Jev can't (or isn't configured to) resolve it, or if neither a selector nor both coordinates are given.
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": {
"sessionId": "<sessionId>"
},
"name": "click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Horizontal viewport coordinate in CSS pixels, used with `y` when no selector is given. | |
| y | No | Vertical viewport coordinate in CSS pixels, used with `x` when no selector is given. | |
| timeout | No | Milliseconds to wait for `selector` to appear. Default 5000. | |
| selector | No | CSS selector of the element to click; the first match is used. Or describe the element in plain words — `jev:<goal>` (e.g. `jev: the login button`) goes straight to the Jev decision model, and when TYPESAFE_API_KEY is set a selector that matches nothing as CSS is retried as such a description. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hit | No | What was at the clicked or tapped point. | |
| url | Yes | The page's URL after the action. | |
| title | Yes | The page's title after the action. | |
| dialog | No | An open dialog's text, if one is showing. | |
| changed | No | A field `type` filled that the page changed once focus left it (a date that reformats or reverts on blur), with both texts. | |
| focused | Yes | The element with keyboard focus, or "nothing". | |
| options | No | The options of a dropdown or list open after the action (the one the focused field controls, else any showing), up to 50: pick one with select_option or click. | |
| answered | No | The page's own dialogs (alert, confirm, prompt, "Leave site?") answered since the last action, each accepted. | |
| rejected | No | Fields the page rejected during the action, each with its message: the browser's own form check (a required field left empty), or the page marking them invalid. The form wasn't sent while any remain. | |
| navigated | Yes | Whether the URL changed. | |
| focusTrail | No | With press_key's `repeat`: the focused element after each press. |