Skip to main content
Glama

long_press

Simulate a press-and-hold on an element or screen coordinates to open context menus or enter Home Screen edit mode. Use it when a tap is insufficient.

Instructions

Press and hold an element handle or "x,y" (context menus, Home Screen edit mode).

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": {
      "target": "<target>"
    },
    "name": "long_press"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYes
hold_msNo
max_wait_msNo
observe_afterNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It never says how long the hold lasts, whether the call blocks until the gesture completes, whether observe_after triggers a screen read as a side effect, or what happens on timeout — all material for a gesture that mutates UI state.

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 tight sentence with the key action and target formats front-loaded and zero filler. It is terse to the point of being cryptic about timing, but nothing is wasted.

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?

An output schema exists, so return values need not be described. However, for a state-changing gesture tool with zero annotations and 0% parameter coverage, the definition leaves the hold duration, wait behavior, and post-gesture observation behavior entirely unexplained.

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

Parameters2/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 usefully clarifies that target accepts an element handle or "x,y" coordinates, but hold_ms, max_wait_ms, and observe_after — three of four parameters — get no explanation at all, leaving their defaults and semantics opaque.

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 verb+resource ("Press and hold") and enumerates the two accepted target forms: an element handle or "x,y" coordinates. It also names concrete scenarios (context menus, Home Screen edit mode), which lets an agent distinguish it from a plain tap without opening the schema.

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 parenthetical examples imply when to reach for this tool over a short tap, but there is no explicit when-not guidance and no named alternative such as tap or tap_text. 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.