Skip to main content
Glama

Robot Actions — Remote Device Control

Device long press

device_long_press

Long press at (x,y) on an Android device screen. Triggers context menus, drag handles, and other long-press actions. 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_long_press, which stays callable under its old name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate in physical pixels (from page_source bounds)
yYesY coordinate in physical pixels (from page_source bounds)
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.
durationNoHold duration in ms (default: 800)

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

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

Annotations declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the bar is lower; the description still adds real behavior: 'auto' silently falls back to injected input while 'hid' fails loudly instead. That fallback/failure-mode disclosure is the kind of context annotations cannot convey. It stops short of describing failure errors or session prerequisites.

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?

Front-loaded with the action and coordinates, then the input-path nuance; every sentence carries information. Minor flaw: a missing space between 'bounds).' and 'Pass input="hid"' makes one sentence run together, and the third sentence is dense.

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?

No output schema, but the tool is a gesture with no meaningful return value, and annotations cover the safety profile. The description supplies coordinate semantics, default behavior, and the strict-input escape hatch. It omits error behavior and any device-session prerequisites, which is a modest gap for a 5-param tool.

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 the schema already documents x, y, udid, input, and duration (including the enum semantics and the 800ms default). The description's coordinate-source note (page_source bounds) and input explanation duplicate the schema rather than extending it, so the 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+resource with scope: 'Long press at (x,y) on an Android device screen', and names the effects it produces (context menus, drag handles). It implicitly separates itself from ios_long_press and explicitly from device_uhid_long_press, which it identifies as the legacy name for the strict path.

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 a clear condition for the non-default path: use input='hid' when the gesture must reach the app as real kernel input or must fail loudly rather than silently fall back. It also notes the legacy tool name remains callable, which helps routing. It does not state when to prefer device_tap/device_swipe instead, so no explicit exclusion set.

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