MouseClick
Simulate mouse clicks in an Observable notebook to trigger interactions and inspect behavior. Target by CSS selector or coordinates, choose button, track events.
Instructions
Simulate a mouse click at a position. Can target a specific element or coordinates.
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": "MouseClick"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate (relative to element if selector provided, otherwise viewport) | |
| y | No | Y coordinate (relative to element if selector provided, otherwise viewport) | |
| label | No | Optional label describing the intent of this action (e.g., "expand plot", "zoom in"). Displayed in the notebook's event log overlay. | |
| button | No | Mouse button (0=left, 1=middle, 2=right). Default: 0 | |
| notebook | No | Target notebook (URL, path like "index" or "voronoi", or index like "0"). Optional if you've used FocusNotebook or only one notebook is connected. | |
| selector | No | CSS selector for target element. If provided, position is relative to element. | |
| timeout_ms | No | Maximum time to wait in milliseconds |