Skip to main content
Glama

Long press

long_press

Press and hold a specified device-pixel coordinate for a set duration to open context menus, grab drag handles, and perform hold gestures on Android devices.

Instructions

Press and hold a coordinate (true device pixels) for a duration — for context menus, drag handles, and long-press actions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "x": "<x>",
      "y": "<y>"
    },
    "name": "long_press"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesX coordinate in true device pixels.
yYesY coordinate in true device pixels.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
duration_msNoHold duration in ms. Default 600.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations only declare openWorldHint=false and destructiveHint=false, so the description carries the rest of the behavior burden. It correctly discloses that the hold duration is what defines the action and that coordinates are true device pixels, but says nothing about whether the gesture blocks, what the default hold is derived from, or what happens if the target widget has no long-press handler. Adequate but not rich.

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?

A single front-loaded sentence with zero padding; the unit clarification and the use cases both earn their place. Slightly compressed by the em-dash construction, but nothing is wasted.

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?

This is a low-complexity input tool with full schema coverage, non-destructive annotations, and no output schema, so the description does not need to explain return values. It covers what the gesture is and when it applies; only multi-device behavior and blocking semantics are left to the schema.

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 all four parameters are already documented including the 600ms default and the serial targeting rule. The description only restates the pixel-unit convention for x/y, adding essentially no meaning beyond the schema — baseline 3 applies.

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?

The description states a specific verb+resource ('press and hold a coordinate') plus the distinguishing characteristic of a hold duration, and enumerates concrete outcomes (context menus, drag handles, long-press actions). It implicitly separates itself from the sibling 'tap' by the hold semantics, though it never names tap/swipe/drag to make the boundary explicit.

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 use-case list ('for context menus, drag handles, and long-press actions') gives implied guidance on when to reach for this instead of tap or drag. There is no explicit when-not statement, no mention of prerequisites, and no named alternative among the many input siblings.

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