tap
Simulate screen taps at specified coordinates to interact with Android device interfaces for testing and automation workflows.
Instructions
Tap at screen coordinates (x, y)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x": "<x>",
"y": "<y>"
},
"name": "tap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:393-397 (handler)The core handler function for the 'tap' MCP tool. Executes an ADB shell input tap command at the specified screen coordinates (x, y). Supports optional device_serial for multi-device setups.
@mcp.tool() def tap(x: int, y: int, device_serial: str | None = None) -> str: """Tap at screen coordinates (x, y)""" return run_adb(["shell", "input", "tap", str(x), str(y)], device_serial)