tab_drag
Drags with the real mouse from an element or point to another inside a browser tab to handle drag-and-drop, sortable lists, sliders, and canvas move or resize; returns what changed.
Instructions
Drag in a page of the user's browser with the real mouse: from an element or a point to an element or a point, for drag and drop, sortable lists, sliders, and moving or resizing on a canvas. The tab is brought to the front and the page confirms the pointer is on the start before the button goes down. Both ends must be on screen together. Returns what changed on the page. Take refs from tab_read, points from tab_screenshot.
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": "tab_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toX | No | Target point x. CSS pixels from the top-left corner of the viewport, for a page that draws on a canvas (a design tool, a map) and has no element to name: read the point off a tab_screenshot, scaling its pixels by the viewport width it reports divided by the image's width. Give x and y together, instead of a ref. | |
| toY | No | Target point y, with toX. | |
| fromX | No | Start point x. CSS pixels from the top-left corner of the viewport, for a page that draws on a canvas (a design tool, a map) and has no element to name: read the point off a tab_screenshot, scaling its pixels by the viewport width it reports divided by the image's width. Give x and y together, instead of a ref. | |
| fromY | No | Start point y, with fromX. | |
| tabId | No | Tab id from tab_list or tab_read. Defaults to the active tab of the browser window the user used last. | |
| toRef | No | Ref of the element to drop on, from tab_read. | |
| button | No | Mouse button. Defaults to left. | |
| holdMs | No | Milliseconds the button stays down before the pointer moves. Defaults to 10; give 300 to 600 for a list that starts a drag only after a long press. | |
| dwellMs | No | Milliseconds the pointer rests on the target before the release. Defaults to 10; give 300 or more for a target that reacts to hovering (a sortable list making room). | |
| fromRef | No | Ref of the element to drag, from tab_read. | |
| modifiers | No | Modifiers held during the action: Shift, Alt (Option), Meta (Command), Control. E.g. ["Meta"] for a Cmd+click that adds to a selection, ["Alt"] for an Option-drag that duplicates in a design tool. |