Skip to main content
Glama

Drag from one place to another

browser_drag

Simulate a real mouse drag by pressing a source selector or viewport coordinates, moving in steps, and releasing on a target; use it for sliders and canvas drag interactions.

Instructions

Perform a real mouse drag: press on the source, move in steps, release on the target. Source and target may each be a CSS selector or viewport coordinates. Step count matters for pages that track dragging (sliders, canvas) — raise steps if a plain move is not picked up. COLOR: for HTML5 drag-and-drop this will NOT produce a drop event. That is upstream bug 1515879 ("HTML5 drag and drop does not work", Remote Protocol / Marionette, filed 2018-12-21, still NEW) — EventUtils.js ends the drag session without synthesizing drop. Use browser_drag_html5 for HTML5 targets.

Input Schema

NameRequiredDescriptionDefault
toXNoTarget viewport x
toYNoTarget viewport y
fromXNoSource viewport x
fromYNoSource viewport y
stepsNoIntermediate move steps (default 12)
contextNoTab context id (default: the active tab)
toSelectorNoTarget element selector
fromSelectorNoSource element selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, so the description does the heavy lifting by disclosing a significant behavioral limitation: this tool does not synthesize a drop event for HTML5 drag-and-drop, and the upstream bug is identified. It also explains step-count behavior for drag-tracking pages. It does not address permissions or failure behavior, which keeps it just short of 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?

Front-loaded with the action, then the step-tuning advice, then the critical HTML5 limitation and alternative. The bug citation is verbose (includes filing date and status) but is directly relevant to the routing decision, so every sentence earns its place, albeit with some excess detail.

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 eight-parameter mutation tool with no output schema, the description covers the mechanism, the tuning knob, the compatibility limitation, and the alternative. It does not explain selector-versus-coordinate precedence or defaults (context tab, steps), but those are fully covered by the schema at 100% coverage.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds real semantic value for `steps` by explaining why step count matters and when to raise it, beyond the schema's 'Intermediate move steps (default 12)'. Source/target selector versus coordinate duality is left to the schema.

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 and mechanism: 'Perform a real mouse drag: press on the source, move in steps, release on the target.' It also explicitly distinguishes itself from the sibling browser_drag_html5, so an agent can choose between the two without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance (raising `steps` for pages that track dragging) and an explicit when-not-to-use rule: HTML5 drag-and-drop will not produce a drop event, so use browser_drag_html5 instead. The alternative and the condition that selects it are both named.

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

Deploy Server

Other Tools