Skip to main content
Glama

adb_input_pinch

Simulate a two-finger pinch or spread gesture on Android screens to zoom out or zoom in. Specify center point, start and end radius, angle, and duration for controlled multi-touch zooming.

Instructions

Perform a multi-touch pinch (zoom out) or spread (zoom in) gesture. Two fingers move symmetrically toward or away from a center point. Uses parallel swipe injection by default (universal, no root); when root is available, can use raw sendevent for true multi-touch MT protocol injection. The 'auto' method selects the best available approach.

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": {
      "cx": "<cx>",
      "cy": "<cy>",
      "startRadius": "<startRadius>",
      "endRadius": "<endRadius>"
    },
    "name": "adb_input_pinch"
  }
}

Input Schema

NameRequiredDescriptionDefault
cxYesCenter X coordinate of the pinch gesture
cyYesCenter Y coordinate of the pinch gesture
angleNoAngle in degrees for the pinch axis (0=horizontal, 90=vertical, default 90)
stepsNoInterpolation steps for sendevent method (5-60, default 20). More steps = smoother gesture
deviceNoDevice serial
methodNoInjection method: 'auto' (sendevent if root, else swipe), 'swipe' (parallel swipes, universal), 'sendevent' (raw MT protocol, requires root)auto
endRadiusYesEnding distance (px) from center to each finger. Smaller than startRadius = pinch/zoom-out, larger = spread/zoom-in
durationMsNoGesture duration in ms (100-5000, default 500)
startRadiusYesStarting distance (px) from center to each finger

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does meaningful work: it discloses the default rootless parallel-swipe mechanism, the root-gated raw sendevent alternative, and how 'auto' resolves between them. Gaps remain around whether the call blocks for durationMs, how failures are surfaced, and which device is targeted when the device parameter is omitted.

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?

Three tightly packed sentences, front-loaded with the gesture definition before the mechanism details. The final sentence about 'auto' choosing the best approach lightly restates what the method enum already says, but the wording is efficient and free of filler.

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?

For a 9-parameter gesture tool with no annotations and no output schema, the description covers the mechanics and the injection trade-offs well. It leaves a small hole by not indicating what a successful or failed call returns, which matters more given there is no output schema to lean on.

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 cx, cy, startRadius, endRadius, angle, steps, method, durationMs, and device are already documented in the schema, including the smaller-vs-larger radius meaning. The description's 'two fingers move symmetrically toward or away from a center point' adds a useful geometric mental model but no parameter-level detail beyond structured data, so baseline 3 applies.

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?

States a specific verb and resource: a multi-touch pinch (zoom out) or spread (zoom in) built from two symmetric finger paths around a center point. The gesture type inherently separates it from single-pointer siblings like adb_input_drag, adb_input_fling, and adb_input_double_tap, though it never names those alternatives explicitly.

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?

Provides clear operational context for the injection-method choice: swipe-parallel is universal and rootless, sendevent is raw MT and requires root, and 'auto' picks the best available. It stops short of telling the agent when to prefer this tool over adb_input or a generic swipe, and gives no exclusions or preconditions for the gesture itself.

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

Deploy Server

Other Tools