mouse_drag
Simulate a mouse drag by pressing, moving along a path, and releasing at specified coordinates. Automate drag-and-drop, drawing, and selection tasks on macOS.
Instructions
Press, drag along path, release. Coordinates are logical points, origin top-left of the main display. Compute them from the screenshot tool's bounds_pt and px_per_pt metadata.
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": {
"path": "<path>"
},
"name": "mouse_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| button | No | left | |
| duration_ms | No | ||
| require_fresh_screenshot | No |