Skip to main content
Glama
mcp-server-macos

mcp-server-macos

Read an element's text

read_ui_element_text
Read-only

Read all text contained in a UI element, including nested and off-screen content like long text areas, messages, or dialogs, by passing the element ID from a UI lookup tool.

Instructions

Read all the text an element holds, its own and what's in it, what's scrolled out of view included: a long text area, a message, a dialog.

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": {
      "id": "<id>"
    },
    "name": "read_ui_element_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.2

TDQS

A3.7/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 detail beyond them: the read is recursive over descendants and includes content scrolled out of view, which an agent could not assume from the schema.

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?

One front-loaded sentence with the scope statement before the illustrative examples; every clause carries information. The colon-list tail is slightly loose but not wasteful.

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 read-only, single-parameter tool with an output schema and full annotation coverage, the description supplies what structured fields do not: the recursive and offscreen scope. Only explicit routing between sibling read tools is missing.

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 100%, and the single `id` parameter is documented in the schema as coming from get_ui_elements or find_ui_elements. The description adds nothing about the parameter, so the baseline of 3 is appropriate.

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?

"Read all the text an element holds" gives a specific verb plus resource, and the qualifiers (own text plus descendants, offscreen included) precisely bound what is returned. It doesn't explicitly name a sibling such as get_ui_elements, so differentiation is inferable rather than stated.

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 ("a long text area, a message, a dialog") imply when this tool is the right pick, but there is no explicit when-to-use statement, no exclusions, and no pointer to an alternative for cases like reading only a single attribute.

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