drag_drop
Drag one DOM element onto another to reorder Kanban cards, sortable lists, or file targets, choosing HTML5, pointer, or mouse events and returning the method that worked.
Instructions
Drag and drop one DOM element onto another using element references. Tries three methods in order: HTML5 DragEvent (dragstart/drop), PointerEvent sequence (for react-beautiful-dnd and similar libraries), and MouseEvent sequence (basic fallback). Use for Kanban card reordering, sortable lists, file drag targets, or any drag-and-drop interaction between two identifiable DOM elements. Returns which method succeeded. For canvas/coordinate-based drag, use the drag tool instead. Related: drag (coordinate-based drag for canvas/map), drop_file (drop files onto upload zones), get_dom_snapshot (find source and target element refs). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise. RETURNS change_report: when this tool runs, the response includes a change_report field with a compact diff of what the action mutated (URL, dialogs_opened, nodes_added, nodes_removed, attrs_changed, inputs_changed, focus_shift). Use this to learn the consequence without calling read_page next. If the report exceeds the size cap, change_report.truncated:true and change_report_hint are set; call read_page for the full state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Number of intermediate move events during drag (default 10) | |
| client | Yes | Allowlisted client label. Validated against the shared v0.9.36 server/extension allowlist (see mcp/src/tools/visual-session.ts -- MCP_VISUAL_CLIENT_LABELS). Required. | |
| holdMs | No | Milliseconds to hold before starting drag motion (default 150, increase for libraries that need longer press) | |
| tab_id | No | Optional. Tab id this action targets. Omit when the calling agent owns exactly one tab; pass to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this. | |
| is_final | No | When true, the visual session clears immediately after this tool resolves. Optional (default false). | |
| stepDelayMs | No | Delay in ms between each move step (default 20) | |
| visual_reason | Yes | Short human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required. | |
| sourceSelector | Yes | CSS selector or element reference (e.g., "e5", "#card-1") for the element to drag | |
| targetSelector | Yes | CSS selector or element reference (e.g., "e12", "#column-2") for the drop target element |