stop_recording
Stop video recording on iOS simulators using the killall command. Ideal for managing simulator sessions and controlling media capture processes efficiently.
Instructions
Stops the simulator video recording using killall
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:842-871 (handler)The handler function that implements the stop_recording tool logic: sends SIGINT to simctl recordVideo processes using pkill, waits 1 second for finalization, and returns success or formatted error.async () => { try { await run("pkill", ["-SIGINT", "-f", "simctl.*recordVideo"]); // Wait a moment for the video to finalize await new Promise((resolve) => setTimeout(resolve, 1000)); return { isError: false, content: [ { type: "text", text: "Recording stopped successfully.", }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error stopping recording: ${toError(error).message}` ), }, ], }; } }
- src/index.ts:837-873 (registration)The registration of the stop_recording tool on the MCP server, including name, description, empty input schema, and inline handler. Conditional on not being filtered via environment variable.if (!isToolFiltered("stop_recording")) { server.tool( "stop_recording", "Stops the simulator video recording using killall", {}, async () => { try { await run("pkill", ["-SIGINT", "-f", "simctl.*recordVideo"]); // Wait a moment for the video to finalize await new Promise((resolve) => setTimeout(resolve, 1000)); return { isError: false, content: [ { type: "text", text: "Recording stopped successfully.", }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error stopping recording: ${toError(error).message}` ), }, ], }; } } ); }