Skip to main content
Glama

read_page

Get the accessibility tree of page elements to inspect structure as screen readers see it, with filters for interactive elements, depth, or specific branches.

Instructions

Get an accessibility tree representation of elements on the page. By default returns all elements including non-visible ones. Can optionally filter for only interactive elements, limit tree depth, or focus on a specific element. Returns a structured tree that represents how screen readers see the page content. If you don't have a valid tab ID, use tabs_context first to get available tabs. Output is limited to 50000 characters -- if exceeded, the tree is truncated at a line boundary with a note giving the full size; pass a larger max_chars, or use depth/ref_id to focus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNoReturn only changes since your previous read_page on this tab (+ added, - removed, ~ changed).
depthNoMaximum depth of the tree to traverse (default: 15). Use a smaller depth if output is too large.
tabIdYesTab ID to read from. Must be a tab in the current group. Use tabs_context first if you don't have a valid tab ID.
filterNoFilter elements: "interactive" for buttons/links/inputs only, "all" for all elements including non-visible ones (default: all elements)
ref_idNoReference ID of a parent element to read. Will return the specified element and all its children. Use this to focus on a specific part of the page when output is too large.
max_charsNoMaximum characters for output (default: 50000). Set to a higher value if your client can handle large outputs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
provenanceNo
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 does so well. It discloses that all elements (including non-visible ones) are returned by default, the 50000-character output limit, truncation at a line boundary, and the note about full size. These are non-obvious behaviors beyond 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?

The description is moderately long (about five sentences) but each sentence carries necessary information: what it does, defaults, prerequisites, and output limitations. It is front-loaded with the core purpose, and the troubleshooting guidance is relevant and non-redundant.

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?

Given the tool has six parameters, no annotations, and a rich output schema, the description covers all key operational aspects: purpose, default behavior, prerequisite steps, output size limits, and mitigation strategies. Return values are already represented by the output schema, so not repeating them is appropriate.

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 100%, so the baseline is 3. The description adds value by explaining practical parameter usage: default depth, default max_chars, truncation behavior, and how depth/ref_id can narrow focus when output is too large. It also clarifies the filter default ('all elements').

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 uses a specific verb and resource: 'Get an accessibility tree representation of elements on the page.' It clearly distinguishes this from sibling tools like get_page_text by emphasizing how screen readers see the page content, not just raw text.

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?

The description provides clear usage guidance: it tells the agent to use tabs_context first if there's no valid tab ID, and offers strategies for when output is too large (increase max_chars or use depth/ref_id). It does not explicitly name alternative tools, but the accessibility-tree framing makes the intended use clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sylin-org/ghostlight'

If you have feedback or need assistance with the MCP directory API, please join our Discord server