mobile_install_app
Install mobile applications on iOS or Android devices by providing the device identifier and app file path, supporting .apk, .ipa, and .app formats for automated deployment.
Instructions
Install an app on mobile device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| path | Yes | The path to the app file to install. For iOS simulators, provide a .zip file or a .app directory. For Android provide an .apk file. For iOS real devices provide an .ipa file |
Implementation Reference
- src/android.ts:361-370 (handler)Handler for installing app on Android devices using adb install command with error handling.public async installApp(path: string): Promise<void> { try { this.adb("install", "-r", path); } catch (error: any) { const stdout = error.stdout ? error.stdout.toString() : ""; const stderr = error.stderr ? error.stderr.toString() : ""; const output = (stdout + stderr).trim(); throw new ActionableError(output || error.message); } }
- src/ios.ts:150-160 (handler)Handler for installing app on iOS real devices using go-ios install command with tunnel check and error handling.public async installApp(path: string): Promise<void> { await this.assertTunnelRunning(); try { await this.ios("install", "--path", path); } catch (error: any) { const stdout = error.stdout ? error.stdout.toString() : ""; const stderr = error.stderr ? error.stderr.toString() : ""; const output = (stdout + stderr).trim(); throw new ActionableError(output || error.message); } }
- src/mobile-device.ts:160-162 (handler)Handler for installing app on simulators/mobilecli devices using mobilecli apps install command.public async installApp(path: string): Promise<void> { this.runCommand(["apps", "install", path]); }
- src/server.ts:296-309 (registration)Registers the mobile_install_app tool in MCP server, defines input schema (device, path), and thin handler that delegates to appropriate Robot.installApp based on device.tool( "mobile_install_app", "Install App", "Install an app on mobile device", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), path: z.string().describe("The path to the app file to install. For iOS simulators, provide a .zip file or a .app directory. For Android provide an .apk file. For iOS real devices provide an .ipa file"), }, async ({ device, path }) => { const robot = getRobotFromDevice(device); await robot.installApp(path); return `Installed app from ${path}`; } );
- src/server.ts:300-303 (schema)Zod schema for tool input parameters: device ID and path to app file with platform-specific formats.{ device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), path: z.string().describe("The path to the app file to install. For iOS simulators, provide a .zip file or a .app directory. For Android provide an .apk file. For iOS real devices provide an .ipa file"), },