Skip to main content
Glama

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
NameRequiredDescriptionDefault
platformYesPlatform of the device
urlYesURL to open in the default browser

Implementation Reference

  • 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") });
  • TypeScript interface defining the shape of arguments for the openLink handler.
    export interface OpenLinkArgs { url: string; platform: Platform; }
  • 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 );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zillow/auto-mobile'

If you have feedback or need assistance with the MCP directory API, please join our Discord server