openLink
Automates opening a specified URL in the default browser on Android or iOS devices using the AutoMobile MCP server.
Instructions
Open a URL in the default browser
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Platform of the device | |
| url | Yes | URL to open in the default browser |
Implementation Reference
- src/server/interactionTools.ts:571-580 (handler)The handler function that executes the openLink tool logic. It creates an OpenURL instance and calls execute with the provided URL.const openLinkHandler = async (device: BootedDevice, args: OpenLinkArgs) => { const openUrl = new OpenURL(device); const result = await openUrl.execute(args.url); return createJSONToolResponse({ message: `Opened link ${args.url}`, observation: result.observation, ...result }); };
- Zod schema for validating openLink tool input arguments.export const openLinkSchema = z.object({ url: z.string().describe("URL to open in the default browser"), platform: z.enum(["android", "ios"]).describe("Platform of the device") });
- src/server/interactionTools.ts:52-55 (schema)TypeScript interface defining the shape of arguments for the openLink handler.export interface OpenLinkArgs { url: string; platform: Platform; }
- src/server/interactionTools.ts:731-737 (registration)Registration of the openLink tool in the ToolRegistry, including name, description, schema, and handler.ToolRegistry.registerDeviceAware( "openLink", "Open a URL in the default browser", openLinkSchema, openLinkHandler, false // Does not support progress notifications );