Skip to main content
Glama

tap

Simulate precise taps on Android devices by specifying exact X and Y coordinates for testing or automation.

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, decorated with @mcp.tool() for registration. It executes an ADB command to simulate a tap gesture at given coordinates (x, y) on the connected Android device, with 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})."

Other Tools

Related 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/vs4vijay/espresso-mcp'

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