Take Screenshot
take_screenshotCapture a PNG screenshot of a mobile simulator or emulator screen. Returns the path to the saved image, with automatic retry on transient failures.
Instructions
Capture a PNG of the current simulator/emulator screen; returns an absolute path the agent can read back. Auto-retries on transient failures; returns passed:false on terminal failure instead of throwing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Target mobile platform | |
| timeoutMs | No | Max wait in ms for the capture to complete. Default: 30000. | |
| deviceUdid | Yes | UDID of the booted simulator or emulator (from list_devices) | |
| outputPath | No | Absolute path where the PNG should be written. If omitted, a timestamped file is created under tmpdir/mobile-automator-screenshots/. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | Truncated stdout/stderr from the capture tool | |
| passed | Yes | Whether the screenshot was captured and saved | |
| platform | Yes | ||
| imagePath | Yes | Absolute path of the written PNG | |
| sizeBytes | No | Size of the saved PNG in bytes | |
| deviceUdid | Yes | ||
| durationMs | Yes |