Skip to main content
Glama

long_press

Simulates a touch-and-hold gesture on a UI element using its tree ref to trigger long-press actions and verify resulting behavior on a live device session.

Instructions

Long-press (touch and hold) an element by its ref.

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

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from the UI tree (e.g. @e5 or e5).
session_idNoSession ID to target. Optional: falls back to the MCP-server-held dev_start session, then this project's `vibeview dev --detach` state, if either is available.
duration_msNoHold duration in milliseconds (default: 800).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

The sole annotation is readOnlyHint=false, so the description must carry the behavioral burden and does not: it says nothing about what a long-press triggers (context menu, drag initiation), whether it holds until a release, or side effects on app state. Beyond restating the gesture, it adds no operational context an agent couldn't guess.

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?

A single short sentence, front-loaded with the action and immediately clarifying the gesture in parentheses. No filler or redundancy.

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 fully documents all three parameters and their defaults, so the definition is usable as-is, but the description omits outcome behavior for a gesture that typically opens menus or starts drags. For a UI-mutating interaction tool with only a readOnlyHint annotation, a sentence on expected effect would close the gap.

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 ref, session_id, and duration_ms are all documented in the schema itself, including the 800ms default and session fallback chain. The description only echoes ref via "by its ref" and adds nothing about duration or session targeting, which is the expected baseline when the schema does the work.

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?

"Long-press (touch and hold) an element by its ref" names a specific gesture and the resource it acts on, and the parenthetical resolves ambiguity about what long-press means. It stops short of contrasting with the sibling `press`/`tap` tools, so an agent must infer the distinction from names alone.

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?

There is no when-to-use guidance: nothing says when to prefer long_press over press, tap, or drag, nor when-not to use it (e.g. elements that don't support long-press). The only context is the definitional gloss "touch and hold", which explains the gesture rather than its selection criteria.

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