Skip to main content
Glama

Drag

drag

Press, hold, move, and release between device-pixel coordinates to operate handles, long-press reorder lists, and drop targets that quick swipes skip.

Instructions

Press-hold-move-release drag from (x1,y1) to (x2,y2) in true device pixels (input draganddrop, Android 11+). Unlike swipe (which flings), this holds at the start first — use it for drag handles, long-press-to-reorder lists, and drag-and-drop targets a quick swipe skips.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1YesStart X in true device pixels.
x2YesEnd X in true device pixels.
y1YesStart Y in true device pixels.
y2YesEnd Y in true device pixels.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
duration_msNoDrag duration in ms. Default 400.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, so the safety profile is known. The description adds genuinely new behavioral context: the gesture holds at the start before moving, and the tool requires Android 11+ (input draganddrop) — a hard platform constraint an agent must know before calling. It stops short of describing failure modes or what happens on unsupported API levels.

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?

Two tightly packed sentences with zero filler; the coordinate/gesture definition is front-loaded and the disambiguation against swipe follows immediately, matching the order an agent needs to evaluate the tool.

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 a simple coordinate-input tool with a fully documented schema, annotations, and no output schema, the description covers purpose, gesture mechanics, and the Android 11+ prerequisite. The only real gap is a brief note on duration tuning for slow reorder interactions, which is minor.

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 all six parameters including duration_ms and the optional serial are already documented. The description restates the 'true device pixels' unit but adds no syntax, defaults, or tuning guidance (e.g. when to raise duration_ms for reorder lists) beyond the schema, so 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 sequence and resource: 'Press-hold-move-release drag from (x1,y1) to (x2,y2) in true device pixels', plus the underlying primitive (input draganddrop, Android 11+). It explicitly distinguishes itself from the swipe sibling, so an agent can pick between drag, swipe, and long_press without opening schemas.

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 concrete when-to-use cases (drag handles, long-press-to-reorder lists, drag-and-drop targets) and names the contrasting sibling ('Unlike swipe (which flings)'). It does not address the long_press sibling, which overlaps with the hold-at-start behavior, leaving one routing decision to inference.

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