eval_script
Evaluate an async IIFE on a connected mobile app to run custom logic and retrieve its result or error, enabling runtime inspection and control.
Instructions
On the connection instance identified by deviceId and appId, evaluate one inline async IIFE and return its result or error with action-scoped evidence. The source must have the form (async () => { ... })().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | Android package name or iOS bundle identifier. | |
| source | Yes | Complete async IIFE source, for example `(async () => { return runtimeStatus(); })()`. | |
| deviceId | Yes | Canonical ADB serial, CoreDevice identifier, or simulator UDID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| result | No | ||
| evidence | Yes | Evidence JSON files, ordered by the first record for each action. |