Skip to main content
Glama

Robot Actions — Remote Device Control

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

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

With no annotations, the description carries the full burden. It discloses the gesture sequence, coordinate system (physical pixels from page_source bounds), and the fallback vs. strict input behavior. It explains that 'auto' falls back silently while 'hid' fails loudly. It does not mention return values or error handling beyond that, but for a gesture tool it is sufficiently transparent.

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 well-structured and front-loaded with the core action. Each sentence adds value: action, distinctions, use cases, coordinate note, and input behavior. It avoids redundancy and is appropriately sized for the complexity of 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?

The description covers the gesture mechanics, usage scenarios, coordinate origin, and the special input mode. It does not describe return values (no output schema) or detailed failure modes beyond the input choice, but for a drag-and-drop gesture tool this is adequate. It also mentions the legacy name device_uhid_drag_drop, which is helpful for migration.

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?

The schema already documents all 8 parameters (100% coverage), but the description adds meaning beyond that: it clarifies that coordinates are physical pixels sourced from page_source bounds, and explains the timing semantics of holdMs and durationMs. It also elaborates on the input parameter's enum values and their consequences, which is valuable context.

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 tool's purpose: 'Drag-and-drop on an Android device: hold at (x1,y1) for holdMs to grab, then move to (x2,y2) over durationMs.' It names specific resources and actions, and explicitly differentiates from device_swipe and device_long_press, making it unambiguous which tool to select.

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?

Provides explicit usage guidance: 'Use for app-icon reorder, drag-into-folder, slide gestures that need a deliberate grab.' It also contrasts with swipe and long press, and explains when to use input='hid' versus the default auto mode, covering both when-to-use and when-not-to-use.

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