screenshot
The screenshot tool captures the current screen of a booted simulator or connected physical device and saves it as a PNG file. If no output path is provided, a timestamped file is automatically generated in a temporary directory. This is useful for visual regression checks, documenting UI states, and capturing evidence of bugs during debugging sessions.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
deviceId | string | Yes | — | UDID of the simulator or physical device to capture. |
outputPath | string | No | Auto-generated | File path where the PNG screenshot will be saved. A timestamped path is created if omitted. |
Usage Examples
Section titled “Usage Examples”Capture a screenshot with auto-generated path
Section titled “Capture a screenshot with auto-generated path”“Take a screenshot of my iPhone simulator”
{ "deviceId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890"}Save screenshot to a specific location
Section titled “Save screenshot to a specific location”“Take a screenshot of the simulator and save it to my Desktop”
{ "deviceId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890", "outputPath": "/Users/developer/Desktop/login-screen-dark-mode.png"}Capture screenshot for a bug report
Section titled “Capture screenshot for a bug report”“Screenshot the current state of the simulator and save it in my project’s bug-reports folder”
{ "deviceId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890", "outputPath": "/Users/developer/Projects/WeatherApp/bug-reports/layout-overflow-issue.png"}Example Output
Section titled “Example Output”Screenshot saved to: /var/folders/xk/7q2m1h3n0fg3_rl5zt8k5c9w0000gn/T/screenshot-2026-02-23-143205.pngFile size: 284 KBResolution: 1290 x 2796 pixels (3x Retina)Device: iPhone 16 Pro (A1B2C3D4-E5F6-7890-ABCD-EF1234567890)Related Tools
Section titled “Related Tools”screen_record— Record a video of the screen instead of a single frame.device_appearance— Switch between light and dark mode before capturing screenshots.status_bar_override— Set a clean, consistent status bar (9:41 AM, full battery) for polished App Store screenshots.accessibility_audit— Pair a screenshot with an accessibility audit to visually document issues.