click
Simulates real mouse input at an element center or x,y coordinates; accepts alert/confirm dialogs, dismisses prompts, and reports page changes.
Instructions
Click with real mouse input at an element's center (fails if something covers it) or at x, y. Accepts alert and confirm dialogs, dismisses prompts. Returns changes: what changed on the page. Locators in every tool are case-sensitive: ref=e12 until the page navigates; CSS; text=Foo and name=Foo, the first visible element whose text or accessible name equals, else contains, Foo (a label finds its control); role=button[name="Save"]; a >> b for b inside a, and has-text=Foo to filter: tr >> has-text=Ada >> text=Delete. Only refs reach into iframes.
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 | Viewport CSS px, with y, instead of selector. | |
| y | No | ||
| button | No | Default left. | |
| selector | No | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b | |
| sessionId | No | ||
| timeoutMs | No | ms to retry while the element is missing, covered, outside the viewport, or disabled (default 2000). | |
| clickCount | No | 2 for a double click. |