tap_element
Locate and tap a mobile UI element by text, resource ID, or type; optionally wait or scroll until it appears before tapping its center.
Instructions
Find a UI element by text, resource_id, or type and tap its center. Combines get_ui_tree + tap in one call. Optionally waits for the element, or scrolls to find it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "tap_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | If multiple matches, tap the Nth one (0-based). Default: 0 | |
| observe | No | Capture screen state after tapping. Default: none | |
| platform | No | Target platform. Inferred if omitted. | |
| wait_for | No | If true, poll until the element appears before tapping. Default: false | |
| device_id | No | Device ID. Omit for the connected device. | |
| text_exact | No | Tap element whose text matches exactly | |
| timeout_ms | No | Max wait time when wait_for is true. Default: 10000 | |
| max_scrolls | No | Maximum number of scrolls when scroll_to_find is true. Default: 5 | |
| resource_id | No | Tap element whose resource_id contains this substring (case-insensitive). Useful for icon buttons without visible text. | |
| text_contains | No | Tap element whose text contains this substring (case-insensitive) | |
| scroll_to_find | No | If true, scroll iteratively to find the element before tapping. Default: false | |
| observe_delay_ms | No | Ms to wait before observing. Default: 500 | |
| scroll_direction | No | Direction to scroll the content when scroll_to_find is true. Default: down | |
| observe_stabilize | No | If true, wait for UI to stabilize after tap. Default: false |