Skip to main content
Glama

get_accessible_tree

Read-only

Read what a screen reader finds in a GUI session: every visible node with role, name, description, and states. Find clickable elements by name and detect unnamed controls.

Instructions

Read what a screen reader would find: every visible node, a line each, indented, with its role, name, description and the states a screen reader says (focusable, focused, checked...). The cheapest way to see what's on screen and what can be clicked by name. A node with an empty name ("") is one a screen reader can say nothing for. Use take_screenshot for how it looks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boundsNoAdd @x,y WIDTHxHEIGHT to each line
windowNoA window's title, exactly or a regex matched in full, or app=RE for its app id
sessionYesIts name, from start_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish a safe read (readOnlyHint=true, openWorldHint=false), but the description adds real value beyond them: the exact output shape (indented lines, per-node role/name/description/state) and the semantic that an empty name string means the screen reader can say nothing. It does not mention cost limits or behavior on very large trees, which keeps it from a 5.

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

Conciseness5/5

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

Three sentences, front-loaded with the capability and output format, then the cost/positioning claim, then the alternative route. Every sentence earns its place with no redundancy or filler.

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?

With no output schema, the description carries the burden of explaining return values and does so well (line-per-node, indented, field list, empty-name meaning). It is nearly complete; only truncation or large-tree behavior is unaddressed.

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 bounds, window, and session are already documented in the schema and the description need not repeat them. The description adds no parameter-level detail (e.g. how bounds interacts with the line format), so the baseline 3 applies.

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?

States a specific verb and resource — reading the accessibility tree — and enumerates exactly what each line contains (role, name, description, states). It is clearly distinguishable from sibling tools like take_screenshot and check_accessible_names, which operate on the same UI but answer different questions.

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?

Positions the tool as "the cheapest way to see what's on screen and what can be clicked by name" and names the alternative with its condition: "Use take_screenshot for how it looks." That is a clear routing rule, though it gives no explicit when-not (e.g. large trees, when a screenshot is required for verification).

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