List what an app shows
get_ui_elementsLists a macOS app's visible UI elements—buttons, text fields, links, menus—with IDs, names, values, and positions so you can inspect and act on them.
Instructions
List what an app shows on screen: its buttons, text fields, links, checkboxes, tabs and menus, each with an id, its name, its value and where it is. Use it to see an app before acting on it, rather than a screenshot: then press_ui_element, set_ui_element_value or click_menu_item with what it gives.
Only what can be seen is listed: the window in front, with the panels over it. When a menu, a dialog or a sheet (a save panel) is open, only it is, as nothing else can be used until it closes. Web pages are read too, in Safari, Chrome and Electron apps. Some apps (games, a few cross-platform ones) show little or nothing this way: take a screenshot then.
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": "get_ui_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | The app, by name, bundle identifier or path. The app in front by default. | |
| include_text | No | Also list what's there to be read (text, headings, images), not only the controls. | |
| max_elements | No | The most elements to list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app's name. | |
| note | No | Something to know about the list, when there is. | |
| elements | Yes | Top to bottom, as a person reads the window. |