Skip to main content
Glama

long_press

Simulate a long press on an Android element or screen coordinate to open context menus, select items or text, and move icons. Use it when a normal tap won't reveal hidden options.

Instructions

Press and hold an element (by id from the last read_screen) or a screen coordinate in pixels, for about 0.7 s. Use it for what apps put behind a long press: a message's or item's menu (reply, copy, delete, react), selecting items or text, moving icons. Use tap for normal taps. Returns "Long-pressed" and where; call read_screen to see the menu or selection it opened.

Input Schema

NameRequiredDescriptionDefault
xNoX in screen pixels, when there's no element id
yNoY in screen pixels, when there's no element id
elementNoElement id from read_screen (give this, or x and y)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • changedInput schema / properties / element / description
      Previous value: -"Element id from read_screen"New value: +"Element id from read_screen (give this, or x and y)"
    • changedInput schema / properties / x / description
      Previous value: -"X in screen pixels"New value: +"X in screen pixels, when there's no element id"
    • changedInput schema / properties / y / description
      Previous value: -"Y in screen pixels"New value: +"Y in screen pixels, when there's no element id"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the hold duration (~0.7 s), the target resolution rule tied to read_screen, the return value ('Long-pressed' plus location), and the required follow-up (call read_screen to see the opened menu). That is a rich behavioral profile for a UI interaction 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?

Three tight sentences, front-loaded with the core action and duration, followed by usage and then the return/follow-up. Every sentence adds distinct value with no repetition.

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

Completeness5/5

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

There is no output schema, and the description compensates by stating the return value and the natural next step (read_screen). For a three-parameter, annotation-free interaction tool, nothing an agent needs in order to invoke it correctly is missing.

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 the schema already explains x, y, and element. The description restates the element-vs-coordinate alternative and adds the 'from the last read_screen' provenance hint, but provides no additional syntax or constraint detail beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb and resource ('press and hold an element or screen coordinate') with the timing (about 0.7 s), and explicitly distinguishes itself from tap. An agent can tell exactly what this does versus the sibling tap/press tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names concrete use cases (message/item menus, selecting items or text, moving icons) and routes normal taps to the tap tool. It also says which target form to supply (element id from the last read_screen, or x/y pixels), leaving little to inference.

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