Skip to main content
Glama

Long Press

long_press

Hold an Android UI element to open its context menu or begin a drag; target by ref, text, content description, or x/y coordinates with optional hold time.

Instructions

Long-press an element (e.g. to open a context menu or start a drag). Targets work like tap(): ref, text/content_desc, or raw x,y (with image_width/image_height when they come from a scaled screenshot). ms (hold time, default 800) only applies to the x,y form.

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
msNo
refNo
textNo
deviceNo
image_widthNo
content_descNo
image_heightNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose one real trait — the hold duration default of 800 ms and the fact that `ms` only applies to the x,y form — but says nothing about what the press does to UI state, whether it blocks/waits, or what happens if the target isn't found.

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?

Three tight sentences, front-loaded with the action and its use cases, then the targeting model, then the one non-obvious parameter rule. Nothing is redundant.

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 no explanation, but for a 9-parameter UI-interaction tool with zero annotations the description leaves gaps: the `device` parameter, target-resolution precedence, and failure/blocking behavior are unaddressed.

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 0%, so the description must compensate; it does explain five of the nine parameters (ref, text/content_desc, x/y, image_width/image_height, ms) and the important constraint that ms is ignored for element targeting. However, `device` is never mentioned and the precedence between ref, text, and x/y is only implied by wording.

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 names a specific verb+resource ("long-press an element") and gives concrete purposes for it (open a context menu, start a drag), which distinguishes it from the plain tap sibling. It stops short of an explicit 'this is tap-with-a-hold' contrast line, but the reference to tap() makes the relationship clear.

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 examples (context menu, drag start) imply when this is the right tool, but there is no explicit 'use this instead of tap/swipe when...' guidance and no mention of alternatives among the many siblings (tap, swipe, scroll). Usage is inferable rather than stated.

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