Skip to main content
Glama
mcp-server-macos

mcp-server-macos

Find an element on screen

find_ui_elements
Read-only

Locate UI controls or text on a Mac screen by name, role, or both, so you can target the right button, field, or menu item before acting on it.

Instructions

Find the elements on screen with a name, a role, or both: the 'Send' button, the search field. Those named exactly so come first ('Save' before "Don't Save"), then the others, top to bottom. Text is found too, not only controls. Give a name, a role, or both.

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": "find_ui_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoThe app, by name, bundle identifier or path. The app in front by default.
nameNoA part of its name, label, text, placeholder or tooltip, in any case.
roleNoWhat it is: 'button', 'text field', 'link', 'check box', 'menu item', 'search field'...

Output Schema

NameRequiredDescriptionDefault
appYesThe app's name.
noteNoSomething to know about the list, when there is.
elementsYesTop to bottom, as a person reads the window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real behavioral context beyond that: result ordering is exact-name matches first ('Save' before "Don't Save"), then remaining matches top to bottom, and that plain text is matched as well as controls — directly useful for interpreting results. It does not say what happens when nothing matches or whether results are capped.

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

Conciseness3/5

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

Most of the text is front-loaded and efficient, including the useful ordering rule. However, the 'Give a name, a role, or both' instruction repeats the opening clause 'with a name, a role, or both,' so one sentence is largely redundant.

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 3-optional-parameter lookup tool with an output schema and annotations already present, the description covers purpose, matching behavior, and result ordering adequately. Only the empty-result behavior and any result-count limits are left unstated.

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?

With 100% schema description coverage, the schema already documents app, name, and role in detail, so the baseline is 3. The description adds marginal meaning by emphasizing that 'name' matching includes text content, not just control labels, and that all three are optional selectors, but it adds no new format or syntax detail.

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?

States a specific verb and resource ('Find the elements on screen') and clarifies the matching dimension (name, role, or both) with concrete examples like the 'Send' button and the search field. It does not explicitly distinguish itself from the sibling get_ui_elements, which is the main gap keeping this from a 5.

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?

The examples ('the Send button, the search field') imply the intended use case, and the closing 'Give a name, a role, or both' hints at the constraint that at least one selector is needed. However, no alternative tool is named and there is no explicit when-not guidance, so the agent must infer the boundary with get_ui_elements.

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