mobile_open_url
Open a specified URL directly in the browser on a mobile device using the Mobile Next MCP server, enabling streamlined interaction between applications and web resources.
Instructions
Open a URL in browser on device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to open |
Implementation Reference
- src/server.ts:327-338 (registration)Registration of the 'mobile_open_url' MCP tool, including input schema (url: string) and handler function that requires a selected device (robot) and delegates to robot.openUrl(url), returning a confirmation message.tool( "mobile_open_url", "Open a URL in browser on device", { url: z.string().describe("The URL to open"), }, async ({ url }) => { requireRobot(); await robot!.openUrl(url); return `Opened URL: ${url}`; } );
- src/server.ts:333-337 (handler)The core handler function for the mobile_open_url tool. It checks if a device (robot) is selected, opens the provided URL on the device, and returns a success message.async ({ url }) => { requireRobot(); await robot!.openUrl(url); return `Opened URL: ${url}`; }
- src/server.ts:330-332 (schema)Zod schema for the mobile_open_url tool input parameters: url (string).{ url: z.string().describe("The URL to open"), },
- src/android.ts:256-258 (helper)Android-specific implementation of openUrl using ADB to launch an intent for viewing the URL.public async openUrl(url: string): Promise<void> { this.adb("shell", "am", "start", "-a", "android.intent.action.VIEW", "-d", url); }
- src/iphone-simulator.ts:66-70 (helper)iOS Simulator implementation of openUrl, delegating to WebDriverAgent or simctl.public async openUrl(url: string) { const wda = await this.wda(); await wda.openUrl(url); // alternative: this.simctl("openurl", this.simulatorUuid, url); }