Skip to main content
Glama

List UI elements

ui_elements
Read-only

Lists buttons, fields, menus, links, tabs, and text in a macOS app's focused window via Accessibility, returning each element's id and screen center for reliable click/type_text control.

Instructions

List the buttons, fields, menus, links, tabs and text of the front app's focused window (or a named app) via Accessibility, each with an id and its center in screen points. Use the id with click/type_text: it's far more reliable than pixel guessing.

Input Schema

NameRequiredDescriptionDefault
appNoApp name; default is the front app

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.1

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

readOnlyHint=true already covers the safety profile, and the description adds genuinely useful context beyond it: the data comes from the Accessibility tree, each element carries an id plus a screen-point center, and the default target is the front app. It omits operational caveats such as the Accessibility permission requirement or what happens when the app/window is unavailable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the first defines scope and return shape, the second gives the actionable follow-up. No filler, and the most decision-relevant content (what you get and what to do with it) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries return-value explanation well by specifying that each element has an id and a center in screen points. It is nearly complete for a one-parameter read tool, missing only failure/permission behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single 'app' parameter, and its schema description already states 'App name; default is the front app'. The description's '(or a named app)' merely restates this, adding no syntax, format, or edge-case detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (list) and resource (UI elements of the front or named app's focused window), enumerates what is returned (buttons, fields, menus, links, tabs, text) and even names the retrieval mechanism (Accessibility). This distinguishes it from pixel-based siblings like device_screenshot or look, and from browser_elements which targets DOM content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent how to consume the result: 'Use the id with click/type_text', and frames the choice against the alternative approach ('far more reliable than pixel guessing'). It stops short of stating when to prefer it over browser_elements or look, so the guidance is clear but not complete on sibling selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.