Skip to main content
Glama

browser_read_text

Extract visible text from a page or frame, read a specific field value, or capture form field profiles for web inspection and automation.

Instructions

Read page/frame text. Visible text excludes input/textarea values; use value for one field or snapshot profile=fields for forms. complete_source is source coverage, not pagination; next_offset continues live text, which may change.

Input Schema

NameRequiredDescriptionDefault
nthNoSelector only: zero-based DOM index, AX tree order for role.
modeNovalue: DOM field text; editor: exposed Monaco/CM5 model, otherwise error with evaluate guidance. Both require selector. Virtualized editor DOM/proxy values are not model text.visible
nameNorole only: exact AX name; empty allowed.
frameNoChild frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. ["#frame"]); exclusive with frame_id.
offsetNo
frame_idNo
selectorNoQuery by selector_type; role example: selector="link", name="Claim".
max_charsNo
tab_handleYes
selector_typeNoDefault css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.2
    • changedInput schema / properties / mode / description
      Previous value: -"value: input/textarea/contenteditable; editor: exposed Monaco/CM5 model. Both require selector."New value: +"value: DOM field text; editor: exposed Monaco/CM5 model, otherwise error with evaluate guidance. Both require selector. Virtualized editor DOM/proxy values are not model text."
  2. Changed6 schema fields changedv0.24.2
    • changedInput schema / properties / frame / description
      Previous value: -"Exact child-frame URL/title or CSS iframe path (e.g. [\"#content_iframe\"]); alternative to frame_id. Each path entry uniquely selects an iframe in the preceding document."New value: +"Child frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. [\"#frame\"]); exclusive with frame_id."
    • addedInput schema / properties / mode / description
      Added value: +"value: input/textarea/contenteditable; editor: exposed Monaco/CM5 model. Both require selector."
    • changedInput schema / properties / name / description
      Previous value: -"role only: exact accessible name; may be empty."New value: +"role only: exact AX name; empty allowed."
    • changedInput schema / properties / nth / description
      Previous value: -"Zero-based match index: DOM order, or AX tree order for role."New value: +"Selector only: zero-based DOM index, AX tree order for role."
    • changedInput schema / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."New value: +"Query by selector_type; role example: selector=\"link\", name=\"Claim\"."
    • changedInput schema / properties / selector_type / description
      Previous value: -"Default css. label matches associated HTML labels with whitespace normalized; role uses browser AX semantics."New value: +"Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute."
  3. Changed1 schema field changedv0.24.1
    • changedInput schema / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role, according to selector_type."New value: +"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."
  4. First observedv0.24.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations at all, the description carries the full load and does disclose non-obvious behavior: visible text excludes input/textarea values, and continued reads return 'live text, which may change' rather than a stable snapshot. It omits access/auth expectations and error behavior for the editor/value modes beyond what the schema already states.

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?

Three short clauses, front-loaded with the core action before the caveats. Slightly dense: 'complete_source' and 'next_offset' are introduced without ever being identified as return fields, which costs a little clarity for the space they occupy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 10-parameter tool with a nested frame object, no output schema, and no annotations needs the description to do more. It never explains the offset/max_chars pagination contract, how selector_type interacts with mode, or what the response contains, leaving the highest-complexity parts of the definition undocumented.

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 60%, so several parameters (offset, max_chars, tab_handle, frame_id, nth) rely on the schema alone. The description reinforces mode='value' and mentions complete_source/next_offset, but neither appears in the input schema, so the added parameter meaning is partial rather than compensatory.

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 (read page/frame text) and scopes it to the visible-text mode by default, which tells an agent what kind of extraction this is. It does not name a sibling to disambiguate against, so an agent still has to infer why it should not use browser_snapshot or browser_evaluate instead.

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

Usage Guidelines3/5

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

There is real routing guidance — 'use value for one field or snapshot profile=fields for forms' points at a mode and a different tool. However, there is no explicit when-not-to-use statement versus the other read surfaces (browser_snapshot, browser_evaluate, browser_fetch), and the pagination advice is phrased in terms an agent cannot map to a parameter.

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