Capture a screenshot
screenshotCapture the active app or web session as an image for visual evidence or coordinate-based taps when accessibility data is sparse.
Instructions
Capture a screenshot of the active app or web session. Input fields control capture scope, density, size, and annotations. Use it for visual evidence, or when a snapshot warns that the accessibility tree is sparse: read the image, then press by coordinates. A screenshot alone does not verify a result. Times out after 90s.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Output path. | |
| udid | No | Apple device or simulator UDID. | |
| scale | No | Screenshot scale factor. | |
| cropOn | No | Selector expression; the capture is cropped to the frame the selector resolves on the same screen. | |
| device | No | Device name; ids go in udid or serial. | |
| serial | No | Android, HarmonyOS, or Vega VVD serial. | |
| session | No | Session name. | |
| surface | No | ||
| noRecord | No | Do not record this action. | |
| platform | No | Device platform. | |
| stabilize | No | ||
| fullscreen | No | ||
| screenMask | No | Fill the iOS simulator screen outline with black for this capture. Requires simctl; omit for the default image. | |
| overlayRefs | No | ||
| deviceTarget | No | Device form factor. | |
| pixelDensity | No | Output screenshot pixel density in pixels per logical point. | |
| captureBackend | No | Capture through the XCTest runner instead of the platform default, which leaves out the simulator-drawn Dynamic Island. Local Apple targets only; refused on provider sessions and on a macOS surface the helper captures, and with pixelDensity, screenMask or normalizeStatusBar. | |
| normalizeStatusBar | No |