Skip to main content
Glama

long_press

Simulate a sustained touch at specific screen coordinates on Android or iOS devices, with optional screen capture to verify the resulting UI state.

Instructions

Long-press at a specific coordinate on the device screen

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 to long-press (in native device resolution by default)
yYesY coordinate to long-press (in native device resolution by default)
observeNoCapture screen state after the action. "on_change" returns the first tree that differs — catches a toast a fixed delay would miss. Default: none
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
duration_msNoDuration of the long press in milliseconds. Default: 1000
observe_delay_msNoMs to wait before observing. Default: 500
screenshot_scaleNoIf coordinates come from a scaled screenshot, provide the scale factor (e.g. 0.5). Coordinates will be auto-converted to native resolution.
observe_stabilizeNoWait for the UI to settle instead of a fixed delay. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations state readOnlyHint=false and destructiveHint=false, so the agent knows this mutates UI state without claiming destructiveness. Beyond that the description adds nothing: it does not mention that a hold duration is involved, that screen state can be captured afterwards, or that coordinates may be scaled. For an action with side effects, the disclosure is minimal.

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 sentence that is front-loaded with the action and target, with zero filler or repetition. It is efficient, though its brevity leaves the surrounding complexity unaddressed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with nine parameters, an observation subsystem, coordinate-scaling conversion, and no output schema, a one-line description is thin. The agent gets no signal about duration defaults, how the coordinate space maps to screenshots, or what 'observe' yields at call time.

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 nine parameters, including observe enums, duration_ms, and screenshot_scale, are already documented in structured fields. The description contributes no additional meaning about coordinate handling or observation behavior, which is the expected baseline when the schema does the work.

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 gives a specific verb (long-press) and resource (a coordinate on the device screen), which is more precise than a generic 'interact' and implies a distinction from tap/double_tap by gesture duration. It does not explicitly name a sibling (e.g. tap_element for element-targeted input), so it stops just short of full differentiation.

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 at all: nothing says when a long-press is preferred over tap, double_tap, or tap_element, nor any precondition such as the device needing to be connected. The agent must infer the selection rule entirely from the tool name.

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