query_ui
Query a UI by semantic selector (role, name, value, or id) to find matching nodes. Returns stable refs for matches or nearest candidates to guide retries.
Instructions
Find nodes in a UI by a semantic selector (role, name, value, or id). Returns matches with stable refs; on a miss, returns the nearest candidates to guide a retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| theme | No | ||
| selector | Yes | Selector: `{"role":"button","name":"Add"}` (role/name/value/id). | |
| description | Yes | The UI description: a `fenestra/1` JSON object. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | Nodes matching the selector, in tree order. | |
| nearest | No | When `matches` is empty, up to a few nearest candidates to guide a retry. |