Skip to main content
Glama

Long press

long_press

Simulate a long press on any element or coordinates for a set duration, enabling context menus, item reordering, and other hold-based interactions in mobile UI tests.

Instructions

Long-press an element or coordinates for a duration (ms).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoAbsolute x coordinate (alternative to a selector)
yNoAbsolute y coordinate (alternative to a selector)
idNoStable element id from inspect_screen
ocrNoForce OCR: locate `text` visually in the screenshot instead of the a11y tree (for off-tree / canvas / WebView elements). OCR is also used automatically when a text selector finds nothing in the tree.
textNoMatch by visible text (case-insensitive substring)
indexNoPick the Nth match (0-based) when several match
observeNoWhat to return after the action: 'screen' = fresh compact hierarchy, 'diff' = only what changed since last inspect, 'screenshot' = PNG, 'none' = just confirm.screen
device_idYesDevice id from list_devices (adb serial like 'emulator-5554', or an iOS simulator UDID)
duration_msNo
resource_idNoMatch by resource-id (Android) / identifier (iOS)
accessibilityNoMatch by accessibility label / content-desc
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses the basic action (long-press) and that it can target an element or coordinates, but it does not mention side effects, return behavior, or any consequences such as triggering a context menu. This is a significant gap for a mutating gesture tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the action verb. It is concise and contains no unnecessary words or repetition.

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?

The schema is well-documented (91% coverage), so the description does not need to explain individual parameters. However, it lacks guidance on when to choose element targeting vs coordinates, and there is no mention of the observe parameter's role in controlling return output. For a tool with 11 parameters and no output schema, a bit more context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 91%, so most parameters are already documented. The description adds value by clarifying that duration is in milliseconds (matching the duration_ms parameter) and by summarizing the targeting modes ('element or coordinates'), which helps disambiguate selector vs coordinate usage.

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 uses a specific verb ('long-press') and clearly identifies the resource ('element or coordinates') and parameter ('duration (ms)'). It distinguishes itself from sibling tools like tap or press_key by naming the long-press action explicitly.

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 implies when to use the tool: any situation requiring a long press. However, it does not explicitly contrast with alternatives such as tap or swipe, nor does it provide exclusions or prerequisite conditions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryanperkins/Manos-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server