Preview app
preview_appAn app preview for your own web app in one call: gets the end user's phone (theirs again, started if parked, or a new one; Android at 30 Hz), installs the APK or the iOS build, or opens the Expo link in the matching Expo Go, waits until the app is on screen, and returns an iframe URL framed only by origin (on the workspace's allowed list: PUT /v1/embed/origins). Each stage fails with its own code (install_failed, open_failed) and the phone id; the phone stays for the retry. Billed as normal phone minutes.
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": {
"origin": "<origin>"
},
"name": "preview_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | The origin of the page that holds the iframe, e.g. "https://app.example.com" | |
| apk_url | No | Android: direct link to the .apk, .apks or .xapk | |
| end_user | No | Your id for the person the preview is for, e.g. "user_42": their phone is reused, and usage adds up under it | |
| expo_url | No | Android: the exp:// or exps:// link npx expo start --tunnel prints | |
| platform | No | android (default) or ios | |
| interactive | No | true: your user taps, swipes and types on the phone (Android); default false (view-only) | |
| ios_app_url | No | iOS: a .zip of the simulator build's .app folder | |
| ttl_seconds | No | How long the link opens, 60 to 3600; default 900 | |
| idempotency_key | No | Any unique value, e.g. a UUID. Retrying with the same key and options returns the same preview (24 h). |