app_trace
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Record a session as a trace: start, then every call on this device is a step — before and after, the point an action touched, a failure's error — and after each the screen, with the map's elements drawn over it; stop with a path saves a zip in Vibium's record format, which player.vibium.dev opens. Omit the action to ask whether one is running. Text typed into a field is not recorded, only its length. On a real phone the screenshots are its owner's screen; screenshots false keeps none. One trace per device; ending the session discards it.
Changes the device, the app or the session: readOnlyHint is false.
Arguments
| Name | Type | Required | What it is |
|---|---|---|---|
action | string: start, stop | start or stop. Omit to ask whether a trace is running. | |
device | string | Device serial to target, e.g. "emulator-5554". Omit when only one device is running. | |
driver | string: uiautomator2, uiautomator, wda | Driver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones). | |
maps | boolean | On start: draw the map's elements over each screenshot. Default true. | |
name | string | On start: the trace's title, as the viewers show it. | |
path | string | On stop: where to save the trace, a .zip on this machine. | |
return_data | boolean | On stop without a path: return the zip, base64, instead of saving it — for a daemon on another machine; the CLI and pipe ask for it and save it where the caller said. | |
screenshots | boolean | On start: keep the screen after each call. Default true. |
Examples
Each is the arguments of a tools/call request; the first is shown whole.
Start tracing the session
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_trace",
"arguments": {
"action": "start",
"name": "sign in"
}
}
}
Stop, and save the trace
{
"action": "stop",
"path": "sign-in.zip"
}