Skip to main content
Glama

drag

Press-hold-move-release a drag from start to end coordinates in true device pixels. Use for drag handles, reorder lists, and drag-and-drop targets that require a held start before moving.

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.

Input Schema

TableJSON 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.
Behavior4/5

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

With no annotations provided, the description carries the full burden. It explains the gesture sequence (press-hold-move-release), the hold-at-start distinction, and the underlying Android API. However, it does not disclose whether the operation is blocking, what happens on invalid coordinates, or any side effects. The given detail is good but not exhaustive.

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?

The description is two sentences, front-loaded with the action and then the usage context. Every sentence is informative with no fluff. It is well-structured and easy to parse.

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?

Given the tool's complexity (6 parameters, no output schema, no annotations), the description is reasonably complete. It covers the gesture mechanics, use cases, and sibling differentiation. It lacks details on error handling, device state prerequisites, or return behavior, but for a drag gesture these are not critical omissions.

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% with all 6 parameters documented in the input schema. The description adds minimal value beyond the schema: it mentions 'true device pixels' (already in schema) and the default duration (already in schema). Baseline 3 is appropriate as the description does not introduce new semantic information.

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?

The description clearly states the action ('Press-hold-move-release drag'), the resource (coordinates in true device pixels), and the specific Android input method ('input draganddrop, Android 11+'). It explicitly distinguishes from the sibling tool 'swipe' by noting the hold-at-start behavior, making the purpose unambiguous.

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?

The description provides explicit guidance on when to use this tool: 'use it for drag handles, long-press-to-reorder lists, and drag-and-drop targets a quick swipe skips.' It directly contrasts with 'swipe' (which flings) and gives concrete use cases, though it does not mention alternatives like 'long_press' or 'tap'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iksnerd/adb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server