Skip to main content
Glama

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

NameRequiredDescriptionDefault
toXNoTarget 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.
toYNoTarget point y, with toX.
fromXNoStart 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.
fromYNoStart point y, with fromX.
tabIdNoTab id from tab_list or tab_read. Defaults to the active tab of the browser window the user used last.
toRefNoRef of the element to drop on, from tab_read.
buttonNoMouse button. Defaults to left.
holdMsNoMilliseconds 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.
dwellMsNoMilliseconds 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).
fromRefNoRef of the element to drag, from tab_read.
modifiersNoModifiers 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full load and does disclose real behavior: tab bring-to-front, a pointer-position confirmation before mousedown, the requirement that both endpoints be visible simultaneously, and that the tool reports what changed on the page. It does not cover failure modes (stale refs, endpoints off screen) or what happens when the confirmation fails, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the action and restricted to what matters: what the tool does, the preconditions, and what it returns. Slight redundancy between 'from an element or a point to an element or a point' and the ref/point routing at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation-style interaction tool with no annotations and no output schema, the description covers the essentials: precondition (both ends on screen), tab activation, drag confirmation, and that it returns page changes. Missing error/edge-case behavior is a modest gap but not disqualifying.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains every parameter including holdMs and dwellMs tuning rationale and the screenshot-scaling math for points. The description's only added routing ('refs from tab_read, points from tab_screenshot') largely restates what the schema properties already say, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource and scope: dragging inside the user's browser page with the real mouse, from element-or-point to element-or-point. It enumerates the concrete use cases (drag and drop, sortable lists, sliders, canvas move/resize), which distinguishes it from the OS-level macos_mouse_drag sibling without naming it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating preconditions: the tab is brought to the front, the page must confirm the pointer is on the start before the button goes down, and both ends must be on screen together. It also routes the agent to tab_read for refs and tab_screenshot for points. It stops short of an explicit when-to-use-this-vs-macos_mouse_drag comparison, so no exclusion is stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.