Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

mobile_double_tap_on_screen

Simulate a double-tap gesture at specific screen coordinates on mobile devices to trigger actions like opening apps, confirming selections, or activating UI elements during automated testing.

Instructions

Double-tap on the screen at given x,y coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
xYesThe x coordinate to double-tap, in pixels
yYesThe y coordinate to double-tap, in pixels

Implementation Reference

  • src/server.ts:356-370 (registration)
    Registration of the 'mobile_double_tap_on_screen' MCP tool, including input schema (device, x, y) and handler that calls doubleTap on the device-specific Robot instance.
    tool(
    	"mobile_double_tap_on_screen",
    	"Double Tap Screen",
    	"Double-tap on the screen at given x,y coordinates.",
    	{
    		device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    		x: z.number().describe("The x coordinate to double-tap, in pixels"),
    		y: z.number().describe("The y coordinate to double-tap, in pixels"),
    	},
    	async ({ device, x, y }) => {
    		const robot = getRobotFromDevice(device);
    		await robot!.doubleTap(x, y);
    		return `Double-tapped on screen at coordinates: ${x}, ${y}`;
    	}
    );
  • The tool handler function for mobile_double_tap_on_screen, which retrieves the Robot for the device and invokes its doubleTap method.
    async ({ device, x, y }) => {
    	const robot = getRobotFromDevice(device);
    	await robot!.doubleTap(x, y);
    	return `Double-tapped on screen at coordinates: ${x}, ${y}`;
    }
  • AndroidRobot.doubleTap implementation: performs two taps at the coordinates with a 100ms delay between them.
    public async doubleTap(x: number, y: number): Promise<void> {
    	await this.tap(x, y);
    	await new Promise(r => setTimeout(r, 100)); // short delay
    	await this.tap(x, y);
    }
  • IosRobot.doubleTap implementation: delegates to WebDriverAgent (wda).doubleTap.
    public async doubleTap(x: number, y: number): Promise<void> {
    	const wda = await this.wda();
    	await wda.doubleTap(x, y);
    }
  • MobileDevice.doubleTap implementation (for simulators): performs two sequential taps.
    public async doubleTap(x: number, y: number): Promise<void> {
    	// TODO: should move into mobilecli itself as "io doubletap"
    	await this.tap(x, y);
    	await this.tap(x, y);
    }

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