Skip to main content
Glama

ax_read

Reads visible UI elements from macOS Accessibility or Windows UI Automation to enable automation without screenshots. Returns node details, actions, and snapshot IDs.

Instructions

Canonical ax:read capability. target=paired_page selects only the already consented Chrome document, before native targeting; mutually exclusive with window. Page nodes have provider=chrome_extension and no native marks/global bounds; page failures require inspection/re-pairing and never native or pixel fallback. target=native (default) reads visible semantic UI directly from macOS Accessibility or Windows UI Automation without taking a screenshot. Returns an ephemeral snapshot_id, deterministic node ids, role/name/description/value/actions/state, optional global-logical bounds, explicit coverage/fallback status, and actionable marks. mode=all (default) combines controls with labels/static text/headings; interactive or content narrows the view. Call ax_activate(snapshot_id,node_id) on a fresh actionable node. If coverage is absent/partial, use focused OCR for missing rendered text, then screenshot/zoom only for visual-only pixels. permission_denied means grant Accessibility; do not hide it with a screenshot fallback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoCap on the number of elements returned (default 200, max 400).
modeNo`interactive` returns actionable controls, `content` returns readable labels/text, and `all` combines both in deterministic tree order. Defaults to `all`.
filterNoShow only elements whose role, label, or value contains this case-insensitive substring (e.g. "button", "search", "submit"). Omit to list everything. Filtering only narrows the DISPLAY — the hidden elements keep their numbers and stay clickable by click_mark(N).
targetNo`native` (default) reads AX/UIA. `paired_page` reads only the already consented Chrome document; mutually exclusive with `window`.
windowNoTarget a single on-screen window: a case-insensitive substring of its title or app name (e.g. "Safari", "Settings"). Omit to read the current target app — the last window-captured or read_ui'd app, otherwise the frontmost. Web-page content is included either way (as long as the app has a window); a window= just narrows and sharpens the listing to that window.
max_charsNoUnicode-character output budget (default 30000, max 100000). If hit, `truncated=true` and `partial_reason=character_limit` are returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: no screenshot is taken, page (paired_page) failures never fall back to native or pixel paths, coverage/fallback status is reported explicitly, and permission_denied requires granting Accessibility. It also discloses the ephemeral snapshot_id and the deterministic node-id model that downstream ax_activate depends on.

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?

It is information-dense with little waste, but it is a long unparagraphed block and the opening sentence ('Canonical ax:read capability') is low-value. Several clauses duplicate schema-level detail rather than adding new guidance, so structure and conciseness are only adequate.

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

Completeness5/5

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

There is no output schema, so the description must describe returns, and it does: ephemeral snapshot_id, deterministic node ids, role/name/description/value/actions/state, optional global-logical bounds, coverage/fallback status, and actionable marks. For a 6-parameter, zero-required, read tool this is complete enough to call correctly.

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%, so each parameter is already documented. The description reinforces key semantics (target=native default, paired_page mutually exclusive with window, mode=all default) but mostly restates what the schema already provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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+resource (reads visible semantic UI via macOS Accessibility / Windows UI Automation) and distinguishes itself from screenshot-based and Chrome-document reading paths (target=paired_page vs native). The opener 'Canonical ax:read capability' restates the name, but the rest pins down exactly what is read and how. It does not explicitly differentiate from close siblings like read_ui or dump_ax, so it stops short of 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 Guidelines4/5

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

Gives clear operational guidance: call ax_activate(snapshot_id,node_id) on a fresh actionable node, use focused OCR when coverage is absent/partial, then screenshot/zoom only for visual-only pixels, and treat permission_denied as a grant-Accessibility signal rather than masking it with a screenshot. These are strong when-to-use and sequencing rules. It omits explicit routing against sibling readers (read_ui, dump_ax, chrome_read), which keeps it from a 5.

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