Skip to content

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.

ParameterTypeRequiredDefaultDescription
deviceIdstringYesUDID of the simulator or physical device to capture.
outputPathstringNoAuto-generatedFile path where the PNG screenshot will be saved. A timestamped path is created if omitted.

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"
}

“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"
}

“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"
}
Screenshot saved to: /var/folders/xk/7q2m1h3n0fg3_rl5zt8k5c9w0000gn/T/screenshot-2026-02-23-143205.png
File size: 284 KB
Resolution: 1290 x 2796 pixels (3x Retina)
Device: iPhone 16 Pro (A1B2C3D4-E5F6-7890-ABCD-EF1234567890)
  • 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.