mobile_save_screenshot
Capture and save a screenshot of a mobile device to a specified file path using the Mobile Next MCP Server for automation tasks on iOS and Android.
Instructions
Save a screenshot of the mobile device to a file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| saveTo | Yes | The path to save the screenshot to |
Implementation Reference
- src/server.ts:488-502 (handler)Registration, schema, and handler for the 'mobile_save_screenshot' tool. It retrieves a screenshot from the device robot and saves it to the specified file path.tool( "mobile_save_screenshot", "Save a screenshot of the mobile device to a file", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), saveTo: z.string().describe("The path to save the screenshot to"), }, async ({ device, saveTo }) => { const robot = getRobotFromDevice(device); const screenshot = await robot.getScreenshot(); fs.writeFileSync(saveTo, screenshot); return `Screenshot saved to: ${saveTo}`; } );