Skip to main content
Glama

glass_a11y_snapshot

Read-only

Read the current accessibility snapshot of a native GUI app, with element IDs, roles, labels, values, bounds, and states. Use it to inspect the UI's semantic state before interacting or verifying.

Instructions

Read current semantic state: IDs, roles, name/description, bounded editable value, bounds and states. Values can be absent, redacted or truncated; use wait_for_element for exact verification. IDs refresh each snapshot. A childless Document notice calls for one fresh read, then pixels; an unpublished-content placeholder requires pixels. Errors without an accessibility tree; use glass_screenshot. Batch known actions and checks with glass_do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_nodesNoNode cap; omit for server default, 0 for unlimited. Changing the cap renumbers IDs; re-read them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.8.0
    • changedInput schema / properties / max_nodes / description
      Previous value: -"Maximum number of elements to include. Omit for the default cap (protects the token\nbudget). Pass a larger number to raise it, or `0` for the full tree (no limit). A\nsnapshot renumbers ids, so re-read them after changing this."New value: +"Node cap; omit for server default, 0 for unlimited. Changing the cap renumbers IDs; re-read them."
  2. Changed2 schema fields changedv1.2.0
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / max_nodes
      Added value: +{
      +  "description": "Maximum number of elements to include. Omit for the default cap (protects the token\nbudget). Pass a larger number to raise it, or `0` for the full tree (no limit). A\nsnapshot renumbers ids, so re-read them after changing this.",
      +  "format": "uint32",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  3. Addedv1.0.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only convey readOnlyHint=true; the description adds substantial behavioral context: values can be absent/redacted/truncated, IDs renumber on each snapshot, a childless Document notice requires one fresh read followed by pixels, and errors without an accessibility tree should fall back to glass_screenshot. These are exactly the failure modes and re-read behaviors an agent cannot infer from annotations or 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?

Five dense sentences, each carrying distinct information, with the core purpose front-loaded in the first clause. The collapsed workflow quirk sentence ('A childless Document notice... an unpublished-content placeholder') is terse to the point of requiring careful parsing, but no sentence is wasted.

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 fully covers return contents (IDs, roles, names, values, bounds, states), value fidelity caveats, ID refresh behavior, error conditions and their fallback, and batching guidance. For a read-only snapshot tool whose safety profile is already covered by annotations, nothing needed to invoke it correctly 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 coverage is 100%: the schema for max_nodes already documents the node cap, server default, 0-for-unlimited behavior, and the ID-renumbering consequence of changing the cap. The description itself adds no parameter detail, but with the schema carrying the full burden, the baseline 3 is correct.

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 opening sentence names a specific verb ('Read') and a specific resource (the current semantic state), then enumerates exactly what is returned: IDs, roles, name/description, bounded editable value, bounds, and states. This makes it immediately distinguishable from siblings like glass_screenshot (pixels), glass_wait_for_element (exact verification), and glass_a11y_marks.

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

Usage Guidelines5/5

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

The description names three explicit alternatives with the conditions that select them: wait_for_element when exact verification is needed (values may be absent/redacted/truncated), glass_screenshot when there is no accessibility tree or content is image-based (childless Document notice, unpublished-content placeholder), and glass_do for batching known actions and checks. This is textbook when-to-use-vs-alternatives guidance.

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