Skip to main content
Glama

Robot Actions — Remote Device Control

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

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses the coordinate system, the difference between auto and hid input paths, and the failure mode of the hid path ('fails loudly instead of silently falling back'). It also mentions the migration note about the old name. It does not disclose permissions or return value, but for a gesture tool this is adequate.

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?

The description is two sentences but the second is a run-on that packs several ideas. It front-loads the core action and then explains the input parameter. It is informative but could be tightened. It avoids verbosity and stays focused on key behavior.

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 simplicity and the rich schema (100% coverage), the description covers the essential behavioral aspects: coordinate system, input modes, and failure behavior. It lacks an explicit statement about return values, but no output schema exists and the tool likely returns nothing significant. The migration note adds context. Overall, adequate for an agent to call it correctly.

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 description adds little beyond what the schema already provides. It reiterates the coordinate system (already in schema) and explains the input parameter (also in schema). The only unique addition is the note about the old name, which is not parameter-specific. Baseline of 3 is appropriate.

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 verb 'Long press', the resource 'Android device screen', and the specific coordinates. It also explains the purpose (triggers context menus, drag handles) and distinguishes from other gesture tools by describing the action's nature. The mention of the old name device_uhid_long_press further clarifies its identity.

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

Usage Guidelines3/5

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

The description provides guidance on when to use the 'hid' input path ('when the gesture must be real kernel input or must fail loudly') and notes the old name as an alternative. However, it does not explicitly state when to use this tool versus other gesture tools like device_tap or device_swipe, leaving selection largely to the agent's inference.

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