API: Media Capture
Tools for capturing screenshots and recording videos from the iOS simulator.
screenshot
Takes a screenshot of the iOS Simulator and saves it to a file.
Parameters
Name | Type | Required | Description |
---|---|---|---|
output_path |
string |
Yes | File path where the screenshot will be saved. If relative, it uses the directory from IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR or ~/Downloads if not set. |
udid |
string |
No | UDID of the target simulator. If omitted, the booted simulator is used. |
type |
"png" \| "tiff" \| "bmp" \| "gif" \| "jpeg" |
No | Image format. Defaults to png . |
display |
"internal" \| "external" |
No | The display to capture. |
mask |
"ignored" \| "alpha" \| "black" |
No | Policy for handling the mask on non-rectangular displays. |
Returns
A text message confirming the path where the screenshot was saved.
record_video
Starts recording a video of the iOS Simulator.
Parameters
Name | Type | Required | Description |
---|---|---|---|
output_path |
string |
No | Optional output file path. If not provided, a default name (simulator_recording_<timestamp>.mp4 ) will be used in the default output directory. |
codec |
"h264" \| "hevc" |
No | Specifies the codec type. Defaults to hevc . |
display |
"internal" \| "external" |
No | The display to capture. |
mask |
"ignored" \| "alpha" \| "black" |
No | Policy for handling the mask on non-rectangular displays. |
force |
boolean |
No | If true , overwrites the output file if it already exists. |
Returns
A text message confirming that recording has started and indicating the output file path. Reminds the user to call stop_recording
to finish.
stop_recording
Stops an in-progress video recording started by record_video
.
Parameters
This tool takes no parameters.
Returns
A text message confirming that the recording has been stopped successfully.