Skip to main content
Glama

Robot Actions — Remote Device Control

Device drag drop

device_drag_drop

Drag-and-drop on an Android device: hold at (x1,y1) for holdMs to grab, then move to (x2,y2) over durationMs. Distinct from device_swipe (no hold — scroll-style) and device_long_press (no motion — context menus). Use for app-icon reorder, drag-into-folder, slide gestures that need a deliberate grab. Coordinates are PHYSICAL pixels (from page_source bounds).Pass input="hid" to require the virtual touchscreen: the gesture then reaches the app as real kernel input and fails loudly instead of silently falling back to injected input. That strict path used to be device_uhid_drag_drop, which stays callable under its old name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1YesStart X in physical pixels
x2YesEnd X in physical pixels
y1YesStart Y in physical pixels
y2YesEnd Y in physical pixels
udidYesDevice serial number (UDID)
inputNoInput path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.
holdMsNoHold-in-place duration before motion in ms (default: 500)
durationMsNoMotion duration from start to end in ms (default: 400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  2. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  3. Changed1 schema field changed
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.",
      +  "enum": [
      +    "auto",
      +    "hid"
      +  ],
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false), the description discloses coordinate semantics (physical pixels from page_source bounds), the input path behavior (auto prefers virtual touchscreen and falls back vs hid requiring it and failing loudly), and the renamed-ancestor history. This is operational detail the annotations cannot carry.

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?

Content is front-loaded with the core gesture and routing first, then caveats. It is slightly dense, and the coordinate-pixel point plus the device_uhid_drag_drop historical note are tangential to invocation, but nothing is filler.

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

Completeness5/5

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

With no output schema, no output-return explanation is needed, and the description covers coordinate system, timing parameters, alternative tools, and the input-path contract. An agent has everything required to call this correctly.

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, but the description adds conceptual meaning: holdMs is described as the 'grab' dwell and durationMs as the motion span, and the input enum is framed as a strict-vs-fallback contract. This goes modestly beyond the schema's terse per-field text.

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 names a specific verb+resource ('Drag-and-drop on an Android device') and gives the exact gesture mechanics (hold at x1,y1 for holdMs, move to x2,y2 over durationMs). It explicitly distinguishes itself from device_swipe and device_long_press, so an agent can select it 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 Guidelines5/5

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

It states both when to use it ('app-icon reorder, drag-into-folder, slide gestures that need a deliberate grab') and when not to, naming the two nearest alternatives with the distinguishing condition (swipe = no hold, long_press = no motion). Routing guidance is explicit and complete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources