Skip to main content
Glama

drag

Simulates real mouse press-move-release between a source and destination to automate HTML5 and pointer-event move-and-drop interactions in Chrome.

Instructions

Drag from one target to another with real mouse events; works for HTML5 drag-and-drop and pointer-event drags.

Input Schema

NameRequiredDescriptionDefault
toYesA ref from snapshot/find ("e12"), a point "x,y" in the last screenshot's pixels, or a Playwright selector (text=…, role=button[name="…"], #id, css=…, xpath=…)
tabNoTab id such as "t3"; default is the active tab
fromYesA ref from snapshot/find ("e12"), a point "x,y" in the last screenshot's pixels, or a Playwright selector (text=…, role=button[name="…"], #id, css=…, xpath=…)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With only openWorldHint=true in annotations, the description carries most of the burden; it usefully discloses that real mouse events are dispatched (not synthetic JS dispatch), which is behaviorally meaningful. However, it says nothing about prerequisites (elements needing to be visible/in viewport), auto-scrolling, timing between press/move/release, or failure behavior.

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

Conciseness5/5

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

A single tight sentence with the core action front-loaded and one qualifying clause that earns its place by naming supported drag mechanisms. No filler.

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

Completeness3/5

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

For a 3-parameter, fully documented tool with no output schema and minimal annotations, the description covers what the tool does but omits operational context an agent would want: viewport/visibility requirements, scroll-into-view behavior, drag timing, and what a failure looks like.

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 coverage is 100%, so 'from', 'to', and 'tab' are already fully documented with accepted formats (refs, coordinates, Playwright selectors). The description adds no meaning beyond the schema, so the baseline 3 applies.

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

Purpose4/5

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

The description states a specific verb and resource ('Drag from one target to another') and clarifies the mechanism ('real mouse events') plus the drag flavors it handles (HTML5 DnD and pointer-event drags). It distinguishes itself from siblings like click and hover by implication, but never names them explicitly.

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

Usage Guidelines3/5

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

The clause about HTML5 and pointer-event drags implies when this tool applies, but there is no explicit guidance on when to prefer it over alternatives such as click, evaluate, or a scripted sequence, and no stated prerequisites or exclusions.

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