Skip to main content
Glama

Find UI elements

ui_find
Read-only

Search app windows for UI elements by text and/or role, returning matching IDs, roles, labels, and values for automation.

Instructions

Search an app's windows for elements by text and/or role, returning their ids, roles, labels and values.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "app": "<app>"
    },
    "name": "ui_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesApp to control: finalcut, motion, logic, mainstage, compressor, pixelmator, keynote, pages, numbers, or any other app name, bundle ID or .app path
maxNo
roleNoAccessibility role without the AX prefix, e.g. Button, TextField, CheckBox, PopUpButton, MenuButton, Slider, Row, StaticText
textNoText in the element's title, description or value (case-insensitive)
exactNoRequire the whole text to match
indexNoWhich match to use when several match (0 = first)
withinNoOnly search inside this element id from ui_snapshot

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description usefully discloses the return shape (ids, roles, labels, values) in the absence of an output schema, but says nothing about result ordering, what happens on zero matches, or how 'index' disambiguates beyond the schema default.

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

Conciseness4/5

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

A single front-loaded sentence with no redundant wording; the returned-fields clause is the only addition and it earns its place. Slightly dense but well structured.

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?

For a seven-parameter read-only discovery tool with no output schema, the definition covers what it searches, how to narrow it, and what comes back. The main omission is empty-result and ordering behavior, which matters when the agent must pick a match by index.

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 description coverage is high (86%), so the schema already carries most parameter meaning. The description only restates that text and role are combinable ('and/or'), adding no clarification on precedence between text, exact, role, or within.

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

Purpose4/5

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

The description gives a specific verb and resource ('Search an app's windows for elements') plus the two filtering dimensions (text and/or role) and the returned fields. It is clear enough to act on, but it never distinguishes itself from siblings such as ui_snapshot, which an agent would plausibly consider the alternative way to discover elements.

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

Usage Guidelines3/5

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

Usage is only implied: 'search ... by text and/or role' suggests it is the targeted-lookup counterpart to a full snapshot, and 'within ... from ui_snapshot' hints at a snapshot-then-find workflow. There is no explicit when-to-use, when-not-to-use, or named alternative.

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