Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

Open URL

mobile_open_url
Destructive

Open URLs directly in mobile device browsers to test web content, verify links, or automate navigation tasks on iOS and Android devices.

Instructions

Open a URL in browser on device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
urlYesThe URL to open

Implementation Reference

  • src/server.ts:441-454 (registration)
    Full registration of the MCP tool 'mobile_open_url', including title, description, input schema (device and url), and the handler function. The handler retrieves the appropriate Robot instance based on the device and calls its openUrl method.
    tool(
    	"mobile_open_url",
    	"Open URL",
    	"Open a URL in browser on device",
    	{
    		device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    		url: z.string().describe("The URL to open"),
    	},
    	async ({ device, url }) => {
    		const robot = getRobotFromDevice(device);
    		await robot.openUrl(url);
    		return `Opened URL: ${url}`;
    	}
    );
  • The executing handler logic for the tool: fetches the Robot for the given device and invokes robot.openUrl(url).
    async ({ device, url }) => {
    	const robot = getRobotFromDevice(device);
    	await robot.openUrl(url);
    	return `Opened URL: ${url}`;
    }
  • Input schema using Zod: requires 'device' (string) and 'url' (string) parameters.
    	device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    	url: z.string().describe("The URL to open"),
    },
  • Helper function getRobotFromDevice that selects the correct Robot subclass (IosRobot, AndroidRobot, or MobileDevice) based on the device ID, used by the tool handler.
    const getRobotFromDevice = (deviceId: string): Robot => {
    
    	// from now on, we must have mobilecli working
    	ensureMobilecliAvailable();
    
    	// Check if it's an iOS device
    	const iosManager = new IosManager();
    	const iosDevices = iosManager.listDevices();
    	const iosDevice = iosDevices.find(d => d.deviceId === deviceId);
    	if (iosDevice) {
    		return new IosRobot(deviceId);
    	}
    
    	// Check if it's an Android device
    	const androidManager = new AndroidDeviceManager();
    	const androidDevices = androidManager.getConnectedDevices();
    	const androidDevice = androidDevices.find(d => d.deviceId === deviceId);
    	if (androidDevice) {
    		return new AndroidRobot(deviceId);
    	}
    
    	// Check if it's a simulator (will later replace all other device types as well)
    	const response = mobilecli.getDevices({
    		platform: "ios",
    		type: "simulator",
    		includeOffline: false,
    	});
    
    	if (response.status === "ok" && response.data && response.data.devices) {
    		for (const device of response.data.devices) {
    			if (device.id === deviceId) {
    				return new MobileDevice(deviceId);
    			}
    		}
    	}
    
    	throw new ActionableError(`Device "${deviceId}" not found. Use the mobile_list_available_devices tool to see available devices.`);
    };
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations include destructiveHint=true, indicating potential side effects. The description adds that it opens a URL 'in browser on device', which provides context about the action's scope, but doesn't elaborate on risks (e.g., browser behavior, network effects) beyond what annotations imply. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, front-loading the core action. It's appropriately sized for a simple tool with two parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (destructive action, device dependency) and lack of output schema, the description is minimal but adequate. It covers the basic action but doesn't address potential outcomes or errors, leaving some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear parameter descriptions. The description doesn't add any semantic details beyond the schema (e.g., URL format constraints, device selection nuances), so it meets the baseline of 3 for high coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Open a URL') and the target ('in browser on device'), which is specific and distinguishes it from siblings like mobile_launch_app or mobile_type_keys. However, it doesn't explicitly differentiate from other URL-related tools (none exist in siblings), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., device must be available), exclusions, or compare it to other tools like mobile_launch_app for app-specific URLs. This leaves usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/mobile-next/mobile-mcp'

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