Skip to main content
Glama

Long-press Android display

mobile_input_long_press

Holds a touch on a specific Android display point to trigger long-press actions; target by UI element ref or x/y coordinates.

Instructions

Hold a display-targeted touch at one point by swiping from that point to itself. Pass ref or x and y.

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
refNoRef from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display. Wins over x and y.
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
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. Addedv0.9.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-idempotent, non-destructive input action, so safety is covered. The description usefully discloses that the gesture is synthesized as a zero-distance swipe, which explains why it exists as a distinct tool. It says nothing, however, about how the hold duration is controlled or what failure/side effects to expect, so it adds only modest behavioral context.

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?

Two short sentences, front-loaded with the core action and followed by the minimal targeting instruction. No filler, though the second sentence partially restates the schema's ref description rather than adding new information.

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 need not be described, and annotations cover the safety profile. What is missing for a gesture tool is the hold-duration story (no mention of durationMs or its default/bounds) and any hint of when long press is preferable to tap or drag; the definition is adequate but leaves the agent to infer the defining behavior.

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 50%, and the description partially compensates by telling the agent to supply 'ref or x and y' (the ref-wins-over-coordinates rule is also in the schema). It never mentions durationMs, which is the parameter that actually defines a long press and has a non-obvious default of 800ms with a 200-10000ms range, leaving a meaningful gap.

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 action (hold a touch at one point) and even explains the mechanism (swiping from the point to itself), which implicitly separates it from mobile_input_swipe and mobile_input_drag. It is clear what the tool does, though it never explicitly names the sibling tools it competes with (tap, double_tap).

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?

The second sentence ('Pass ref or x and y') is targeting mechanics, not usage guidance. There is no statement of when a long press is the right gesture versus mobile_input_tap, mobile_input_double_tap, or mobile_input_drag, and no prerequisites or exclusions are given.

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