Skip to main content
Glama

Robot Actions — Remote Device Control

Device pinch

device_pinch

Two-finger pinch-to-zoom centred at (x,y) on an Android device. scale > 1 zooms IN (fingers spread), scale < 1 zooms OUT (fingers converge); ~2 doubles, ~0.5 halves. Both fingers ride a VERTICAL axis through the centre, so the centre governs where they land: put it on the content you want to zoom, ideally the middle third of the screen. A centre near the top or bottom leaves no room — the span is squeezed to fit the content area and the zoom comes out weak or does nothing. Fingers are kept clear of the status and navigation bars; a finger in the status bar pulls down the notification shade instead of touching the app. Bottom sheets, dialogs and cards are app UI and cannot be detected here: if one covers the lower half, centre the pinch above it or the sheet swallows the gesture. The reply reports the finger endpoints and span actually used — if the screen did not change, check those before retrying. Coordinates are PHYSICAL pixels — same as the bounds in device_page_source.Pass input="hid" to require the virtual touchscreen: the gesture then reaches the app as real kernel input and fails loudly instead of silently falling back to injected input. That strict path used to be device_uhid_pinch, which stays callable under its old name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesPinch centre X
yYesPinch centre Y
udidYesDevice serial number (UDID)
inputNoInput path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.
scaleYesEnd/start finger-separation ratio: >1 zoom in, <1 zoom out (0.2-5)
durationNoGesture duration in ms (default: 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  2. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  3. Changed1 schema field changed
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.",
      +  "enum": [
      +    "auto",
      +    "hid"
      +  ],
      +  "type": "string"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only carry the generic safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false, openWorldHint=false). The description goes well beyond that: the vertical-axis geometry, clamping of the finger span to the content area, status-bar fingers pulling down the notification shade, bottom sheets swallowing the gesture, and the fallback semantics of input='hid'. It does not restate safety but adds substantial operational behaviour.

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?

Front-loaded with the core action and scale rule, then layers geometry, pitfalls, and the input path in a logical order. It is dense and fairly long for a gesture tool, but nearly every sentence carries operational value, so it stays just short of being padded.

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?

No output schema exists, and the description compensates by stating what the reply reports (finger endpoints and span actually used) and how to use that on retry. With all six parameters covered, failure modes described, and the legacy alias noted, an agent has everything needed to call it correctly.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: scale is reframed as a ratio with concrete anchors (~2 doubles, ~0.5 halves), coordinates are pinned to PHYSICAL pixels matching device_page_source bounds, and input='hid' is explained in terms of fallback versus hard failure. These are semantic clarifications rather than restatements.

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 ('Two-finger pinch-to-zoom centred at (x,y) on an Android device') and immediately disambiguates it from siblings by scope (Android) and by naming the legacy tool device_uhid_pinch that still works under its old name. An agent can separate this from device_two_finger_swipe, device_gesture_path, or ios_pinch without opening a schema.

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?

Explicit when-to-use guidance: place the centre on the content to zoom, keep it in the middle third, avoid top/bottom where the span gets squeezed, and route around bottom sheets. It also states when to pick input='hid' (gesture must be real kernel input or fail loudly) versus the auto default, and names the alternative device_uhid_pinch.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources