Skip to main content
Glama

Drag on Android display

mobile_input_drag

Simulate a long-press drag-and-drop on a selected Android logical display using coordinates or UI refs from the latest snapshot.

Instructions

Inject a capability-gated long-press drag-and-drop on one logical display. startRef and endRef come from the latest UI read and win over start and end.

Input Schema

NameRequiredDescriptionDefault
endNo
startNo
endRefNoRef from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
startRefNoRef from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.
displayIdYesAndroid framework logical display ID, not a SurfaceFlinger physical ID
durationMsNo

Output Schema

NameRequiredDescriptionDefault
dataYes
deviceYes
backendYes
displayNo
warningsYes
durationMsYes
operationIdYes
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / endRef
      Added value: +{
      +  "description": "Ref from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.",
      +  "pattern": "^@n\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / startRef
      Added value: +{
      +  "description": "Ref from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.",
      +  "pattern": "^@n\\d+$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "serial",
      -  "displayId",
      -  "start",
      -  "end"
      -]New value: +[
      +  "serial",
      +  "displayId"
      +]
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description adds genuine value with 'capability-gated' (the call can fail when the device/display doesn't support the gesture) and the ref-precedence rule, but it never states that repeated drags mutate UI state non-idempotently or whether coordinates are display-relative.

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 sentences, no filler, with the core action front-loaded and the ref-precedence caveat second. Every clause carries information the schema doesn't.

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?

An output schema exists, so return values needn't be explained, and the ref-override rule closes the biggest gap. Still missing for a mutating gesture tool: what durationMs controls (only its 300ms default is visible) and what happens when the capability gate fails.

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 57%, and the description compensates by resolving a real ambiguity the schema leaves open: startRef/endRef override start/end when both are supplied. That precedence rule is the single most important thing to know about this 7-parameter schema. It still leaves durationMs's effect unmentioned.

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?

States a specific action ('Inject a ... long-press drag-and-drop') on a specific resource ('one logical display'), which separates it from siblings like mobile_input_swipe and mobile_input_long_press. It never explicitly names those siblings, so the differentiation is inferential rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says to prefer this over mobile_input_swipe for a drag, or how it differs from mobile_input_long_press. The only conditional content is the ref-vs-coordinate precedence rule, which is parameter semantics rather than usage routing.

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