Skip to main content
Glama

fold

Set the hinge angle or posture on supported iOS simulators and Android emulators to test apps in closed, half-open, or open screen positions.

Instructions

Move the hinge of a foldable iOS simulator (the iPhone Duo) or Android emulator (a Pixel Fold or generic foldable AVD) to a posture or to an angle; pass exactly one of the two. The tool returns when the device accepts input again, so the next tap lands. Use when you must see or test an app in a different posture. list-devices marks foldable devices with foldable: true. To turn a device without a fold, use rotate. All tools use the active panel (the panel that shows the UI), also after a fold made outside argent. The coordinates and the screenshot size change with the panel. Before you tap, read the element tree in this result or run describe again. iOS: unfolded, the UI is landscape, as on a rotated iPhone. A fold between two angles that are not closed or open can keep the current panel. To change panels, fold to closed or open. To move a full-screen app onto either half of the open iPhone Duo, use gesture-custom with edge: "bottom". Drag up, pause at center, then drag sideways and release in one contact. iOS returns { activeScreen, screen: { id, panel, width, height }, posture?, hingeAngle, warning? }. screen names the active panel and gives its size in pixels. posture is set only at 0°, 120° and 180°. warning is set when argent cannot find the active panel, or when the device did not change to the expected panel. Android returns { posture?, deviceState, hingeAngle?, warning? }. deviceState is the state Android committed (CLOSED, HALF_OPENED, OPENED), and posture is the matching preset. A lock screen the fold raises is dismissed; warning is set when it cannot be, or when a lock screen is showing or the screen is off after the fold. On a generic foldable AVD, closed shows only the left part of the display and describe frames do not match tap coordinates; use a Pixel Fold AVD to test the cover panel. Fails if the device is not foldable, is a remote simulator or a physical Android device.

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>"
    },
    "name": "fold"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (a foldable iOS simulator UDID or Android emulator serial).
angleNoThe hinge angle in degrees: 0 = closed, 180 = open. Range: 0 to 180.
postureNoWhere to move the hinge: `closed` shows the cover panel, `half-open` and `open` show the inner panel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / angle / description
      Previous value: -"The hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`."New value: +"The hinge angle in degrees: 0 = closed, 180 = open. Range: 0 to 180."
    • changedInput schema / properties / posture / description
      Previous value: -"Where to move the hinge: `closed` (0°, the cover panel), `half-open` (120°) or `open` (180°, the inner panel). Exactly one of `posture` and `angle`."New value: +"Where to move the hinge: `closed` shows the cover panel, `half-open` and `open` show the inner panel."
    • changedInput schema / properties / udid / description
      Previous value: -"Target device id from `list-devices` (a foldable iOS simulator UDID)."New value: +"Target device id from `list-devices` (a foldable iOS simulator UDID or Android emulator serial)."
  2. Addedv0.26.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does so well: it discloses blocking semantics ('returns when the device accepts input again'), platform-specific return fields, lock-screen dismissal behavior, and warning conditions. The only shortfall is that it never explicitly frames these as automation-hang or timing risks beyond the one line about waiting for input.

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?

Purpose and the exactly-one-of constraint are front-loaded, then platform detail follows in a logical order (iOS, then Android, then failure). It is long for a three-parameter tool, with several dense paragraphs on panel/coordinate side effects that could be tightened, but each block carries operational information rather than filler.

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 mutation-style tool with no annotations and no output schema, the description supplies the return shapes for both platforms, the side effects on coordinates and screenshot size, the panel-switching caveat, and the warning semantics. Nothing an agent needs to call it correctly and interpret the result is missing.

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 coverage is 100% and each parameter already has a description, so the schema does the heavy lifting and baseline 3 applies. The description adds one genuinely new constraint—the mutual exclusivity of `angle` and `posture`—but leaves the interaction between them (e.g., what happens if both describe different states) unstated.

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 ('Move the hinge of a foldable iOS simulator ... or Android emulator') plus the exact constraint ('pass exactly one of the two'). It explicitly distinguishes itself from siblings: `list-devices` identifies foldables, `rotate` turns a device without a fold, and `gesture-custom` handles moving an app onto a half.

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?

Gives an explicit trigger ('Use when you must see or test an app in a different posture') and names concrete alternatives for adjacent needs (`rotate`, `gesture-custom` with edge bottom, `describe` to re-read the tree after a fold). It also states when it fails (non-foldable device, remote simulator, physical Android device), which is effectively a when-not.

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