Skip to main content
Glama

tap

Simulate screen taps on Android devices by specifying X and Y coordinates for automated testing or remote control.

Instructions

Simulate a tap on the connected Android device at the specified coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes

Implementation Reference

  • The main handler function for the 'tap' tool. It uses adb to simulate a tap gesture at given coordinates (x,y) on the connected Android device/emulator. Includes error handling and success message.
    @mcp.tool() def tap(x: int, y: int) -> str: """Simulate a tap on the connected Android device at the specified coordinates""" result = subprocess.run( ["adb", "shell", "input", "tap", str(x), str(y)], capture_output=True, text=True, ) if result.returncode != 0: raise RuntimeError(f"Error performing tap at ({x}, {y}): {result.stderr}") return f"Tap performed at coordinates ({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/vs4vijay/espresso-mcp'

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