double_tap
Tap twice at specified screen coordinates on Android devices for UI testing, app interaction, or gesture simulation during development workflows.
Instructions
Double tap at coordinates
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": "double_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:435-435 (registration)Registers the double_tap tool using the FastMCP decorator
@mcp.tool() - src/adb_mcp_server/server.py:436-441 (handler)The handler function that performs a double tap at the given (x, y) coordinates on the specified device by executing two ADB input tap commands with a short delay between them.
def double_tap(x: int, y: int, device_serial: str | None = None) -> str: """Double tap at coordinates""" run_adb(["shell", "input", "tap", str(x), str(y)], device_serial) time.sleep(0.1) run_adb(["shell", "input", "tap", str(x), str(y)], device_serial) return f"Double tapped at ({x}, {y})"