ui_query
Find Android UI controls by role, label, text, semantic key, or region instead of coordinates, and return stable semantic keys to replay actions after layout changes.
Instructions
Find controls by OS-derived semantics instead of coordinates or pixels. Filter by role (button/text_input/toggle/tab/nav_back/nav_close/list_item/search), by label substring, by text substring, by stable semantic_key, or by region. Returns matches with their semantic_key, which stays valid when the layout moves - use it to replay an action on the same control later without storing a tap position.
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_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | ||
| region | No | ||
| max_results | No | ||
| enabled_only | No | ||
| semantic_key | No | ||
| text_contains | No | ||
| label_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||