open
Boot the selected device when needed, then launch an app, deep link, or URL as the foreground automation target for the session. Reuses debug/Metro hints on later reloads.
Instructions
Boot the selected device when needed, then open an app, deep link, or URL in a session. Use the app or URL inputs to choose what becomes the foreground automation target. Metro and debug runtime hints given here are recorded as the session's dev-server binding, so a later reload reuses them; a fresh open without them clears any binding left by a previous same-name session. Times out after 90s; a caller-supplied budget extends it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App name, bundle id, package, or URL. | |
| url | No | Optional URL passed with an app shell. | |
| udid | No | Apple device or simulator UDID; the selector that pins one device when several share a name. | |
| debug | No | Enable debug diagnostics. | |
| force | No | Overwrite an existing --save-script target instead of refusing (alias: --overwrite). | |
| 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. | |
| waitMs | No | Block this open for up to n milliseconds (100-120000) while another session holds the device, then fail with DEVICE_IN_USE naming that session. Only session contention is waited for: a device claim held by another workspace is refused at once with its recovery command. A device that never frees, or is taken again while this open waits, costs the full budget, which extends this command's timeout envelope rather than eating into it. | |
| leaseId | No | Existing lease identifier. | |
| session | No | Agent-device session name. | |
| surface | No | macOS presentation surface to open: the app itself, the frontmost app, the desktop, or the menu bar. | |
| testIme | No | Activate the headless Android test IME for deterministic Unicode text entry (default on for emulators; opt-in on real devices). | |
| activity | No | Android activity name. | |
| noRecord | No | Do not record this action. | |
| platform | No | Platform selector used to resolve a device. | |
| relaunch | No | Force relaunch. | |
| bundleUrl | No | Session-scoped bundle URL hint applied to the opened app. | |
| launchUrl | No | Session-scoped launch URL hint applied to the opened app. | |
| metroHost | No | Session-scoped Metro/debug host hint applied to the opened app. | |
| metroPort | No | Session-scoped Metro/debug port hint applied to the opened app. On an emulator/simulator the host defaults to the loopback alias (Android 10.0.2.2, iOS 127.0.0.1) when --metro-host is omitted; physical devices still require an explicit --metro-host. | |
| timeoutMs | No | Startup budget in milliseconds. Bounds the Simulator boot wait, so a never-booted Simulator can finish its first-boot migration; omit for the default startup behavior. | |
| foreground | No | Include an initial interactive snapshot in a fresh open response. With no app argument, discover the sole running app on the sole booted iOS simulator; ambiguous environments fail closed. | |
| launchArgs | No | Launch arguments forwarded verbatim to the platform launch command. | |
| saveScript | No | ||
| 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. | |
| launchConsole | No | Launch console mode. | |
| 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. |