Mouse, keyboard and screenshots
computerDrive a Zen browser tab via mouse and keyboard actions and screenshots to click, type, scroll, drag, and inspect page elements.
Instructions
Use a mouse and keyboard to interact with the page in a Zen tab, and take screenshots. If you don't have a valid tab ID, use tabs_context first.
Before clicking, consult a screenshot to find coordinates, or use a ref from read_page/find (preferred: refs are scrolled into view automatically and work inside iframes).
Click in the centre of elements, not on their edges.
Coordinates are in the pixel frame of the latest screenshot (its size is reported with every screenshot).
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": {
"action": "<action>",
"tabId": "<tabId>"
},
"name": "computer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from read_page/find (e.g. "ref_12"). Alternative to coordinate for clicks/hover; required for scroll_to. | |
| text | No | Text to type (type) or keys to press (key). | |
| scale | No | screenshot/zoom: shrink the returned image (coordinates stay in the full frame). | |
| tabId | Yes | Tab ID from tabs_context / tabs_create. | |
| action | Yes | left_click/right_click/double_click/triple_click: click at coordinate or ref. type: type text. key: press keys (space separated, e.g. "ctrl+a Backspace"; use cmd on macOS). screenshot: capture the viewport. wait: pause for duration seconds. scroll: wheel-scroll at coordinate. scroll_to: scroll a ref into view. left_click_drag: drag from start_coordinate to coordinate. hover: move the mouse to coordinate or ref. zoom: capture a region at full resolution. | |
| region | No | (x0, y0, x1, y1) region for zoom, in screenshot pixels. | |
| repeat | No | Repeat count for key. | |
| duration | No | Seconds to wait (wait action, max 10). | |
| modifiers | No | Modifier keys held during a click: "ctrl", "shift", "alt", "cmd"/"meta", combinable with "+" (e.g. "ctrl+shift"). | |
| coordinate | No | (x, y) in screenshot pixels. Required for coordinate clicks and scroll; end point for left_click_drag. | |
| save_to_disk | No | screenshot/zoom: also save the image to disk and return its path. | |
| scroll_amount | No | Wheel ticks (default 3, ≈100px each). | |
| action_summary | No | A few words describing the effect of this action (shown in logs). | |
| scroll_direction | No | ||
| start_coordinate | No | (x, y) start point for left_click_drag. |