Skip to main content
Glama

Read what's in an app's windows

ui_snapshot
Read-only

Read the accessibility tree of an app's windows, sheets and dialogs to inspect panels, progress and element ids for clicking or setting values. Zoom into one element with within to keep results short.

Instructions

Read the accessibility tree of an app's windows, sheets and dialogs: each element's id, role, label and value. Use it to see panels, inspectors, dialogs and progress, and to get element ids for ui_click and ui_set_value. Pass within to zoom into one element. Defaults are small to keep results short (depth 6, 120 elements); when truncated is true, zoom in with within, or raise depth and maxNodes for that one call.

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_snapshot"
  }
}

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
depthNo
withinNoElement id to start from
maxNodesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.4/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, and the description adds behavior those annotations do not cover: small default bounds (depth 6, 120 elements), the existence of a 'truncated' flag, and what to do when it appears. Return shape is characterized at a high level (id, role, label, value), which is useful given there is no output 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?

The core purpose is front-loaded in the first clause, with usage, then parameter guidance in descending importance. It is a single dense paragraph with no filler, though the truncation sentence packs several clauses and could be split for scanability.

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?

With no output schema, the description still conveys what comes back (id, role, label, value) and the truncation signal, and it explains all four parameters' roles even where the schema is silent. For a read-only inspection tool of this complexity, nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 50%: app and within are documented in the schema, while depth and maxNodes are not. The description compensates by explaining the defaults for both, the truncation tradeoff, and the intent of 'within' as zooming into one element, adding meaning beyond the bare schema field.

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?

The description opens with a specific verb and resource: 'Read the accessibility tree of an app's windows, sheets and dialogs,' and enumerates exactly what each element yields (id, role, label, value). It also positions itself relative to ui_click and ui_set_value, so an agent can tell what this tool is for without opening the schema.

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?

It names concrete situations to use it for (panels, inspectors, dialogs, progress) and states the downstream purpose (getting element ids for ui_click/ui_set_value), plus a recovery path when results are truncated. It does not say when to prefer an alternative sibling such as ui_find or ui_screenshot, but the usage context is otherwise explicit.

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