Skip to main content
Glama

gesture-rotate

Rotate on-screen content by sending a two-finger circular arc gesture at a specified center and angle range, useful for turning maps, images, or other rotateable UI elements.

Instructions

Send a two-finger circular arc gesture to rotate on-screen content by a specified angle. Two fingers are placed opposite each other at a fixed radius from the center, then swept from startAngle to endAngle degrees (endAngle > startAngle = clockwise). All positions and radii are normalized 0.0–1.0 (fractions of screen width/height, not pixels), same coordinate space as gesture-tap and gesture-swipe. Typical values: radius 0.15, startAngle 0, endAngle 90 for a 90° clockwise turn. Size the orbit with radius, or with radiusX and radiusY together (the pair overrides radius); one half of the pair alone, or none of the three, is rejected. A single radius traces a physical ellipse on a non-square screen (finger separation varies through the turn); for a physically circular orbit, pass radiusX and radiusY with radiusX·width = radiusY·height. Unlike gesture-pinch which moves fingers linearly to zoom, this orbits fingers in an arc to change orientation. Use when you need to rotate a map, image picker, or any rotateable UI element. Returns { rotated: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend is not reachable for the given device, or on a physical iPhone when the app is not drawn in portrait.

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": {
      "udid": "<udid>",
      "centerX": "<centerX>",
      "centerY": "<centerY>",
      "startAngle": "<startAngle>",
      "endAngle": "<endAngle>"
    },
    "name": "gesture-rotate"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS UDID or Android serial).
radiusNoDistance from the center to each finger.
centerXYesCenter of rotation, horizontal.
centerYYesCenter of rotation, vertical.
radiusXNoFinger distance along the horizontal axis, as a fraction of screen WIDTH.
radiusYNoFinger distance along the vertical axis, as a fraction of screen HEIGHT.
endAngleYesEnding angle in degrees.
durationMsNoTotal gesture duration in milliseconds (default 300)
startAngleYesStarting angle in degrees (0 = right, 90 = down)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / centerX / description
      Previous value: -"Center of rotation, horizontal: normalized 0.0–1.0 (fraction of screen width, not pixels)"New value: +"Center of rotation, horizontal."
    • changedInput schema / properties / centerY / description
      Previous value: -"Center of rotation, vertical: normalized 0.0–1.0 (fraction of screen height, not pixels)"New value: +"Center of rotation, vertical."
    • changedInput schema / properties / endAngle / description
      Previous value: -"Ending angle in degrees. endAngle > startAngle = clockwise."New value: +"Ending angle in degrees."
    • changedInput schema / properties / radius / description
      Previous value: -"Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse — pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given."New value: +"Distance from the center to each finger."
    • changedInput schema / properties / radiusX / description
      Previous value: -"Per-axis finger distance, horizontal: normalized 0.0–1.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX·screenWidth = radiusY·screenHeight for a physically circular orbit — constant finger separation, no pinch coupled into the turn."New value: +"Finger distance along the horizontal axis, as a fraction of screen WIDTH."
    • changedInput schema / properties / radiusY / description
      Previous value: -"Per-axis finger distance, vertical: normalized 0.0–1.0 fraction of screen HEIGHT. Always paired with radiusX — see radiusX."New value: +"Finger distance along the vertical axis, as a fraction of screen HEIGHT."
  2. Changed1 schema field changedv0.22.0
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "radiusX",
      -      "radiusY"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "anyOf": [
      -        {
      -          "required": [
      -            "radiusX"
      -          ]
      -        },
      -        {
      -          "required": [
      -            "radiusY"
      -          ]
      -        }
      -      ]
      -    },
      -    "required": [
      -      "radius"
      -    ]
      -  }
      -]
  3. Changed5 schema fields changedv0.17.0
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "radiusX",
      +      "radiusY"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "radiusX"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "radiusY"
      +          ]
      +        }
      +      ]
      +    },
      +    "required": [
      +      "radius"
      +    ]
      +  }
      +]
    • changedInput schema / properties / radius / description
      Previous value: -"Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center."New value: +"Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse — pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given."
    • addedInput schema / properties / radiusX
      Added value: +{
      +  "description": "Per-axis finger distance, horizontal: normalized 0.0–1.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX·screenWidth = radiusY·screenHeight for a physically circular orbit — constant finger separation, no pinch coupled into the turn.",
      +  "type": "number"
      +}
    • addedInput schema / properties / radiusY
      Added value: +{
      +  "description": "Per-axis finger distance, vertical: normalized 0.0–1.0 fraction of screen HEIGHT. Always paired with radiusX — see radiusX.",
      +  "type": "number"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "udid",
      -  "centerX",
      -  "centerY",
      -  "radius",
      -  "startAngle",
      -  "endAngle"
      -]New value: +[
      +  "udid",
      +  "centerX",
      +  "centerY",
      +  "startAngle",
      +  "endAngle"
      +]
  4. First observedv0.15.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full behavioral burden and does so: it names the exact return payload ({ rotated: true, timestampMs }), the reactivated flag semantics on physical iOS, and two concrete failure conditions (unreachable simulator/emulator backend, physical iPhone not drawn in portrait). It also discloses rejection rules for the radius/radiusX/radiusY combination, which is behavior the agent could not otherwise predict.

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 purpose, then constraints, then example, then contrast, then failure modes — a sensible order with no filler sentences. The middle paragraph packs the ellipse/override rules densely enough that it reads as one long run-on, costing a little scannability.

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?

For a nine-parameter, five-required gesture tool with no output schema, the description covers input coordinate semantics, mutually exclusive parameter combinations, expected return shape, and failure modes. An agent has everything needed to call it correctly and to interpret a failure.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description still adds real meaning: centerX/centerY/radius are stated to be normalized fractions of screen width/height rather than pixels, the radiusX/radiusY pair is declared to override radius, and the circular-orbit formula (radiusX·width = radiusY·height) is given along with the consequence of using a single radius on a non-square screen. These are constraints no schema field expresses.

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?

Opens with a specific verb and resource: "Send a two-finger circular arc gesture to rotate on-screen content by a specified angle." It explicitly contrasts itself with gesture-pinch (linear vs orbital finger motion) and anchors its coordinate space to gesture-tap and gesture-swipe, so an agent can place it among siblings without opening schemas.

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?

"Use when you need to rotate a map, image picker, or any rotateable UI element" gives concrete triggering contexts, and the gesture-pinch contrast plus the typical-value example (radius 0.15, 0 to 90) tell the agent how to invoke it. It stops short of stating when to prefer a different approach (e.g. gesture-custom) or when rotation is a poor choice, so it is strong context rather than a full decision rule.

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