Skip to main content
Glama
Mobile Next MCP Server

Mobile Next MCP Server

Official
by mobile-next

Long Press Screen

mobile_long_press_on_screen_at_coordinates

Long press on the screen, either at x,y coordinates or on an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.

Instructions

Long press on the screen, either at x,y coordinates or on an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.

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": {
      "device": "<device>"
    },
    "name": "mobile_long_press_on_screen_at_coordinates"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoThe x coordinate to long press on the screen, in pixels. Required unless ref is given
yNoThe y coordinate to long press on the screen, in pixels. Required unless ref is given
refNoElement ref from mobile_list_elements_on_screen, e.g. "@e5". Takes precedence over x,y
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
durationNoDuration of the long press in milliseconds. Defaults to 500ms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.11
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Element ref from mobile_list_elements_on_screen, e.g. \"@e5\". Takes precedence over x,y",
      +  "type": "string"
      +}
    • changedInput schema / properties / x / description
      Previous value: -"The x coordinate to long press on the screen, in pixels"New value: +"The x coordinate to long press on the screen, in pixels. Required unless ref is given"
    • changedInput schema / properties / y / description
      Previous value: -"The y coordinate to long press on the screen, in pixels"New value: +"The y coordinate to long press on the screen, in pixels. Required unless ref is given"
    • changedInput schema / required
      Previous value: -[
      -  "device",
      -  "x",
      -  "y"
      -]New value: +[
      +  "device"
      +]
  2. Changed1 schema field changedv1.0.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changedv1.0.3
    • addedInput schema / properties / x / minimum
      Added value: +0
    • addedInput schema / properties / y / minimum
      Added value: +0
  4. Addedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the agent knows this is a non-destructive but state-changing interaction on an external device. The description adds the ref-precedence rule, which is useful, but says nothing about duration, timing sensitivity, or what a long press can trigger on a UI (menus, drag states).

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?

Two tight sentences with no filler. The action and its two modes lead, and the ref-preference guidance is the second sentence, so the most actionable constraint is not buried.

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

Completeness4/5

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

With no output schema, five parameters, and 100% schema coverage, the description supplies the decision logic the schema cannot (which input mode to prefer). Only the duration parameter and the device requirement are absent from the description, both fully documented in the schema.

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%, including x/y requirements, ref precedence, device lookup, and the 500ms default duration with its 1-10000ms bounds. The description only echoes the coordinates-vs-ref choice, adding no format or default detail beyond the schema, so the baseline 3 applies.

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?

Specific verb+resource (long press on screen) with both invocation modes (x,y coordinates or element ref) stated up front. The action is clearly distinct from siblings like mobile_click_on_screen_at_coordinates and mobile_double_tap_on_screen, and it names mobile_list_elements_on_screen as the source for refs.

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

Usage Guidelines4/5

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

"Prefer ref when the element is listed" gives an explicit selection rule between the two input modes and ties it to a specific sibling tool. It lacks a when-not / alternative-tool branch (e.g. when to use double-tap or click instead), so it falls short of full routing guidance.

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