Skip to main content
Glama

double_tap

Tap twice at specified screen coordinates to zoom in/out or select text on Android devices.

Instructions

Double tap at specific coordinates on the Android screen. Useful for zooming or selecting text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
device_idNoDevice serial number

Implementation Reference

  • The implementation of the doubleTap function which executes two rapid tap commands via ADB shell.
    export async function doubleTap(x: number, y: number, deviceId?: string): Promise<{ x: number; y: number }> {
      const resolved = await deviceManager.resolveDeviceId(deviceId);
      deviceManager.checkRateLimit(resolved);
    
      const coords = await normalizeCoordinates(x, y, resolved);
      validateCoordinate(coords.x, 'x');
      validateCoordinate(coords.y, 'y');
    
      // Two rapid taps
      await adbShell(['input', 'tap', String(coords.x), String(coords.y)], resolved);
      await new Promise(resolve => setTimeout(resolve, 50));
      await adbShell(['input', 'tap', String(coords.x), String(coords.y)], resolved);
    
      deviceManager.touchSession(resolved);
      log.info('Double tap performed', { x: coords.x, y: coords.y, deviceId: resolved });
      return coords;
    }

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/divineDev-dotcom/android_mcp'

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