Skip to main content
Glama

Read page structure

read_page
Read-only

Extracts an accessibility-tree outline of a browser tab with ref_N element references for clicking, form input, scrolling, and file upload, including iframe content.

Instructions

Get an accessibility-tree style outline of the page with element refs (ref_N) usable by computer, form_input, scroll_to and file_upload. Includes the contents of iframes. By default returns all elements (non-visible ones are marked hidden); filter='interactive' returns only visible buttons/links/inputs. Output is limited to max_chars (default 50000).

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": {
      "tabId": "<tabId>"
    },
    "name": "read_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoMaximum tree depth (default 15).
tabIdYesTab ID from tabs_context / tabs_create.
filterNo"interactive" for visible buttons/links/inputs only, "all" (default) for everything.
ref_idNoOnly return this element and its descendants.
max_charsNoMaximum output characters (default 50000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond readOnlyHint=true, it discloses that iframes are traversed, that hidden elements are marked rather than dropped, and that output is truncated to max_chars (default 50000). Useful behavioral detail. It is silent on whether refs stay stable between reads and what the output looks like when truncation occurs, which are the remaining practical unknowns.

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?

Four compact sentences: what is returned, what the refs are for, iframe scope, then filtering and size limits. Front-loaded with the payload description, and no sentence is filler, despite mild overlap with schema defaults.

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?

There is no output schema, so the description must characterize the return value, and it does: a tree outline of elements with ref_N handles. Combined with the truncation note and iframe scope, an agent has enough to call it correctly; stability of refs across calls is the one omission.

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 all five parameters are already documented; the description mostly restates filter and max_chars with their defaults. It adds no meaning for depth or ref_id, which are not mentioned at all. Baseline 3 applies when the schema carries the weight.

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 and resource: an accessibility-tree style outline of the page with element refs (ref_N), including iframe contents. That is concrete enough to separate it from a plain text extractor, but it never names a sibling such as get_page_text or find to mark the boundary explicitly.

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?

Usage context is clear rather than exclusionary: the refs produced are declared usable by computer, form_input, scroll_to and file_upload, which tells the agent this is the discovery step before interaction. It also flags when to prefer filter='interactive'. It does not say when not to use it (e.g. when static text is enough).

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