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;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but omits critical behavioral details: timing between taps, coordinate system (pixels, origin), what happens if coordinates are out of bounds, or whether it waits for UI animations to complete.

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?

Two efficient sentences with zero waste. The core action is front-loaded in the first sentence, while the second provides contextual use cases without verbosity.

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

Completeness4/5

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

Given the low complexity (3 simple parameters) and 100% schema coverage, the description is adequate, though it could improve by specifying the coordinate system (e.g., screen pixels) and default behavior when optional device_id is omitted.

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 coverage is 100% with basic descriptions ('X coordinate', 'Device serial number'), establishing a baseline of 3. The description mentions 'specific coordinates' reinforcing x/y parameters but does not elaborate on coordinate system details, optional device_id defaults, or valid value ranges.

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

Purpose5/5

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

The description specifies the exact action (double tap), target (Android screen), and mechanism (specific coordinates), clearly distinguishing it from siblings like 'tap' (single), 'long_press', and 'click_element' (which likely uses selectors rather than coordinates).

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

Usage Guidelines3/5

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

It provides implied usage through examples (zooming, selecting text) but lacks explicit guidance on when to prefer this over 'tap' or when to use coordinate-based vs element-based tools like 'click_element' or 'smart_click'.

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

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