Skip to main content
Glama

fold

Set a foldable iPhone simulator's hinge to a posture or angle (0-180°), returning when the device is ready for the next tap.

Instructions

Move the hinge of a foldable iOS simulator (the iPhone Duo) to a posture (closed, half-open, open) or to an angle (0-180°). 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: closed shows the cover panel, half-open and open show the inner panel. list-devices marks foldable simulators 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. 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. 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. Fails if the device is not foldable or is a remote simulator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (a foldable iOS simulator UDID).
angleNoThe hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`.
postureNoWhere to move the hinge: `closed` (0°, the cover panel), `half-open` (120°) or `open` (180°, the inner panel). Exactly one of `posture` and `angle`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.26.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the tool returns only when the device accepts input, that all tools operate on the active panel, that coordinates/screenshot size change with panel, and that some folds preserve the current panel. It also documents failure conditions and warning behavior, which is unusually thorough.

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?

The description is dense and front-loaded with purpose and timing, and it is organized into clear paragraphs. It is longer than strictly necessary and contains a mildly confusing phrase ('also after a fold made outside argent'), but no sentence is filler and each block serves a distinct role.

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?

There is no output schema and no annotations, so the description must supply the full contract. It defines the return object fields, when `posture` is included, what `warning` indicates, and the exact failure cases. Combined with 100% schema parameter coverage, an agent has everything needed to call and interpret the result.

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. The description adds useful meaning beyond the schema by mapping postures to angles and panel visibility (closed=cover; half-open/open=inner) and explaining when `posture` appears in the result. It does not greatly elaborate on `udid`, but the schema already covers that sufficiently.

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?

The description opens with a specific action ('Move the hinge'), a specific resource ('foldable iOS simulator'), and the two modes (`posture` or `angle`). It explicitly distinguishes itself from `rotate` for non-foldable devices, so an agent can immediately tell this apart from sibling tools.

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?

It says exactly when to use the tool ('Use when you must see or test an app in a different posture') and names the alternative for non-foldable devices ('use `rotate`'). It also points to `list-devices` for detecting foldable simulators, giving a complete decision path.

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