fold
Fold or unfold a foldable iPhone simulator (iPhone Duo) or a foldable Android emulator into the closed, half-open, or open pose.
Instructions
Fold or unfold a foldable iPhone simulator (iPhone Duo) or a foldable Android emulator into the closed, half-open, or open pose. iOS sends a simulator HID hinge event, then reads the hinge angle back from CoreDevice to confirm it, and can follow timestamped angle keyframes; Android sets the emulator console posture, then confirms the device state the guest commits and reports the hinge angle the AVD profile defines for that posture, and dismisses the lock screen a fold to the cover display can raise. On iOS a pose change moves the app to a different panel with a different point size; on Android a fold to or from closed moves the app between the cover and inner displays, and any pose change can reshape the app window, whose size the next snapshot reports. Either way every ref and coordinate from before it is stale: re-snapshot after this command. Taps, long presses, and scrolling target the app window on its current panel in closed, half-open, and open poses. Simulator and emulator only; iOS requires the iOS simulator SDK; Device Hub and host Accessibility permission are not required. A simulator scoped to a non-default simulator set is refused with UNSUPPORTED_OPERATION and reason unsupported-device-scope; run fold against a simulator in the default set. Times out after 255s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pose | No | Instant preset; mutually exclusive with keyframes. | |
| udid | No | Apple device or simulator UDID; the selector that pins one device when several share a name. | |
| debug | No | Enable debug diagnostics. | |
| runId | No | Lease run identifier. | |
| device | No | Device name selector (a UDID belongs in udid, a serial in serial). | |
| serial | No | Android, HarmonyOS, or Vega VVD serial selector. | |
| target | No | Alias for deviceTarget on commands without a UI target field. Interaction commands reserve target for the UI element. | |
| tenant | No | Remote tenant identifier. | |
| leaseId | No | Existing lease identifier. | |
| session | No | Agent-device session name. | |
| noRecord | No | Do not record this action. | |
| platform | No | Platform selector used to resolve a device. | |
| keyframes | No | Piecewise-linear hinge motion. Start at 0ms; strictly increasing timestamps, up to 60000ms. Repeated angles create holds. Mutually exclusive with pose. | |
| includeCost | No | Include per-command agent-cost (cost.wallClockMs, …) in structuredContent. Defaults to off; the default response shape is unchanged. | |
| deviceTarget | No | Device target form. Maps to the CLI --target flag. | |
| responseLevel | No | Response verbosity: token-cheap digest / default (today) / full. Defaults to default; the default response shape is unchanged. | |
| mcpOutputFormat | No | MCP text content format. Defaults to optimized agent-friendly text; use json for JSON text. Structured content is always returned separately. | |
| androidDeviceAllowlist | No | Android serial allowlist used for device resolution. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pose | Yes | ||
| action | Yes | ||
| screen | No | ||
| message | Yes | ||
| hingeAngleDegrees | Yes | Hinge angle read back after the pose settled: from CoreDevice on iOS, from the emulator hinge sensor on Android. |