ui_tap_element
Tap a UI element on an Android device by searching text, resource ID, class name, or content description. When targeting a label, it automatically taps the nearest input field.
Instructions
Find a UI element by text, resource ID, class name, or content description, and immediately tap it. Smartly finds the nearest input field when targeting a label.
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": "ui_tap_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text content to search for | |
| index | No | If multiple elements match, which one to tap (0-indexed) | |
| serial | No | Device serial number | |
| className | No | Class name to match exactly | |
| exactMatch | No | If true, text and contentDesc require exact matches | |
| resourceId | No | Resource ID to match exactly | |
| contentDesc | No | Content description to search for | |
| preferInput | No | If true and matching a label, finds nearest input field instead |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Human-readable status message | |
| success | Yes | Whether the element was found and tapped |