Skip to main content
Glama

Mobilebox: Cloud phones for your agents

Preview app

preview_app

An 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

NameRequiredDescriptionDefault
originYesThe origin of the page that holds the iframe, e.g. "https://app.example.com"
apk_urlNoAndroid: direct link to the .apk, .apks or .xapk
end_userNoYour id for the person the preview is for, e.g. "user_42": their phone is reused, and usage adds up under it
expo_urlNoAndroid: the exp:// or exps:// link npx expo start --tunnel prints
platformNoandroid (default) or ios
interactiveNotrue: your user taps, swipes and types on the phone (Android); default false (view-only)
ios_app_urlNoiOS: a .zip of the simulator build's .app folder
ttl_secondsNoHow long the link opens, 60 to 3600; default 900
idempotency_keyNoAny unique value, e.g. a UUID. Retrying with the same key and options returns the same preview (24 h).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: explains which phone will be used (the end user's existing one, a parked one started, or a new one), the 30 Hz Android cadence, that it blocks until the app is on screen, that failures carry stage-specific codes plus the phone id and the phone survives for retry, and that usage is billed as normal phone minutes. These are exactly the side effects and cost implications an agent needs before invoking a non-readOnly, open-world tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the rest is a run-on single paragraph dense with nested parentheticals ('theirs again, started if parked, or a new one', the origin whitelist path, the regex-free idempotency aside). A staged breakdown (phone selection / source / result / errors / billing) would make it far easier to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter composite tool with no output schema, it covers the lifecycle, the returned iframe URL, the failure model and billing. It stops short of describing what else the success response contains (e.g. the phone id or preview identity on success), which matters given there is no output schema.

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, but the description adds real meaning by framing apk_url, ios_app_url and expo_url as mutually exclusive source options routed to different runtimes, and by explaining that end_user drives phone reuse and usage attribution. It says nothing about ttl_seconds, interactive or idempotency_key, leaving those entirely to the schema.

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: an app preview delivered 'in one call' that acquires a phone, installs the APK/iOS build or opens an Expo link, waits for the app to render, and returns an iframe URL. The 'in one call' framing implicitly separates it from the granular siblings (install_app, embed_phone, observe) without needing their names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Makes clear when this is the right choice: previewing 'your own web app' end-to-end rather than assembling the steps manually. It states a hard precondition (origin must be on the workspace allowed list via PUT /v1/embed/origins) and retry guidance via failure codes and the retained phone id, but it never explicitly names the granular alternatives or a when-not case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.