mobile_launch_app
Open specific mobile applications on iOS or Android devices by providing the app's package name and device identifier.
Instructions
Launch an app on mobile device. Use this to open a specific app. You can find the package name of the app by calling list_apps_on_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. | |
| packageName | Yes | The package name of the app to launch |
Implementation Reference
- src/server.ts:266-279 (registration)Registration of the 'mobile_launch_app' MCP tool, including title, description, input schema (device ID and packageName), and the handler function.tool( "mobile_launch_app", "Launch App", "Launch an app on mobile device. Use this to open a specific app. You can find the package name of the app by calling list_apps_on_device.", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), packageName: z.string().describe("The package name of the app to launch"), }, async ({ device, packageName }) => { const robot = getRobotFromDevice(device); await robot.launchApp(packageName); return `Launched app ${packageName}`; } );
- src/server.ts:270-273 (schema)Zod input schema for the tool: device (string, device identifier), packageName (string, app package name).{ device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), packageName: z.string().describe("The package name of the app to launch"), },
- src/server.ts:274-278 (handler)Inline handler function: retrieves Robot instance for the device via getRobotFromDevice and invokes robot.launchApp(packageName).async ({ device, packageName }) => { const robot = getRobotFromDevice(device); await robot.launchApp(packageName); return `Launched app ${packageName}`; }
- src/android.ts:141-147 (helper)AndroidRobot.launchApp: launches app using 'adb shell monkey -p {packageName} -c android.intent.category.LAUNCHER 1'.public async launchApp(packageName: string): Promise<void> { try { this.silentAdb("shell", "monkey", "-p", packageName, "-c", "android.intent.category.LAUNCHER", "1"); } catch (error) { throw new ActionableError(`Failed launching app with package name "${packageName}", please make sure it exists`); } }
- src/ios.ts:140-143 (helper)IosRobot.launchApp: launches app using go-ios 'launch' command after asserting tunnel.public async launchApp(packageName: string): Promise<void> { await this.assertTunnelRunning(); await this.ios("launch", packageName); }
- src/mobile-device.ts:152-154 (helper)MobileDevice.launchApp: launches app via mobilecli 'apps launch {packageName}' command.public async launchApp(packageName: string): Promise<void> { this.runCommand(["apps", "launch", packageName]); }