Skip to main content
Glama
TiagoDanin

Android Debug Bridge MCP

by TiagoDanin

input_tap

Simulate screen taps at precise coordinates on Android devices for automated testing and UI interaction.

Instructions

Tap at specific coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate for tap
yYesY coordinate for tap

Implementation Reference

  • The handler function that implements the input_tap tool logic: taps at (x,y) coordinates using ADB command and appends updated UI hierarchy dump.
    input_tap: async (args: any) => {
      const { x, y } = args as { x: number; y: number };
      
      await executeCommand(`adb shell input tap ${x} ${y}`);
      
      const uiContent = await captureUIContent(false);
      
      return {
        content: [
          {
            type: 'text',
            text: `Tap executed at coordinates: (${x}, ${y})`,
          },
          ...uiContent,
        ],
      };
    },
  • Input schema and metadata definition for the input_tap tool.
      name: 'input_tap',
      description: 'Tap at specific coordinates',
      inputSchema: {
        type: 'object',
        properties: {
          x: {
            type: 'number',
            description: 'X coordinate for tap',
          },
          y: {
            type: 'number',
            description: 'Y coordinate for tap',
          },
        },
        required: ['x', 'y'],
      },
    },
  • src/index.ts:26-30 (registration)
    Registration of the list tools handler, which exposes the input_tap tool via the toolDefinitions array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions,
      };
    });
  • src/index.ts:32-46 (registration)
    Registration of the call tool handler, which dynamically invokes the input_tap handler from toolHandlers object based on tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const handler = toolHandlers[name as keyof typeof toolHandlers];
        if (!handler) {
          throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
        }
    
        return await handler(args);
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${errorMessage}`);
      }
    });
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 only states the basic action. It doesn't disclose behavioral traits such as whether the tap is immediate, if it requires specific permissions, what happens if coordinates are invalid, or if there are rate limits. This leaves significant gaps for a mutation tool.

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 extremely concise with a single, front-loaded sentence that directly states the tool's function. There is zero wasted language, making it efficient and easy to parse.

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

Completeness2/5

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

Given the tool's complexity (a mutation with no annotations or output schema) and the description's minimalism, it's incomplete. It lacks details on behavior, error handling, or integration with sibling tools, leaving the agent with insufficient context for reliable use.

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?

The schema description coverage is 100%, with both parameters (x and y) documented in the schema. The description adds no additional meaning beyond implying coordinate-based input, so it meets the baseline of 3 where the schema does the heavy lifting.

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 'Tap at specific coordinates' clearly states the action (tap) and target (specific coordinates), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like input_keyevent or input_scroll, which are also input actions but with different modalities.

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?

The description provides no guidance on when to use this tool versus alternatives like input_keyevent or input_text. There's no mention of context (e.g., for UI interaction vs. text entry) or prerequisites (e.g., needing an app open).

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/TiagoDanin/Android-Debug-Bridge-MCP'

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