Skip to main content
Glama

browser_read_text

Reads visible page or frame text in chunks using offsets and limits, and retrieves form field values or editor text via selector modes when visible text excludes them.

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.

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": {
      "tab_handle": "<tab_handle>"
    },
    "name": "browser_read_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNoZero-based match index.
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
nameNoExact AX name; role only.
frameNoChild frame; see shared locator rules.
offsetNo
frame_idNo
selectorNoLocator query.
max_charsNo
tab_handleYes
selector_typeNoDefault css.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.34.0
    • changedInput schema / properties / frame / description
      Previous 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."New value: +"Child frame; see shared locator rules."
    • changedInput schema / properties / name / description
      Previous value: -"role only: exact AX name; empty allowed."New value: +"Exact AX name; role only."
    • changedInput schema / properties / nth / description
      Previous value: -"Selector only: zero-based DOM index, AX tree order for role."New value: +"Zero-based match index."
    • changedInput schema / properties / selector / description
      Previous value: -"Query by selector_type; role example: selector=\"link\", name=\"Claim\"."New value: +"Locator query."
    • changedInput schema / properties / selector_type / description
      Previous value: -"Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute."New value: +"Default css."
  2. 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."
  3. 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."
  4. 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."
  5. First observedv0.24.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that visible text omits input/textarea values and that paginated live text may change between calls, which is real behavioral value. However, it references 'complete_source' and 'next_offset', neither of which appears in the input schema, and says nothing about return shape, truncation signaling, or failure modes, leaving the agent to guess.

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

Conciseness3/5

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

It is short, front-loaded, and free of filler, which is good. The third sentence is terse to the point of being cryptic, packing source coverage, pagination, and mutability into one clause whose referents (complete_source, next_offset) are never defined.

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

Completeness2/5

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

For a ten-parameter tool with nested frame locators, no annotations, and no output schema, the description should explain what comes back, how truncation is signaled, and how offset interacts with max_chars. Instead it leaves the return contract undocumented and cites parameters that the schema does not define, so an agent cannot reliably page through results based on this text alone.

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 60% across ten parameters, so the schema handles much of the burden. The description adds meaning to mode=value and clarifies that source coverage is distinct from pagination, but it introduces the undocumented names complete_source and next_offset and never explains offset, max_chars, or the locator fields beyond the schema text.

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?

The opening sentence gives a specific verb and resource ('Read page/frame text'), so the core operation is unambiguous. It partially differentiates from adjacent tools by routing form fields to 'value' mode or to 'snapshot profile=fields', though it never contrasts itself with browser_evaluate or browser_snapshot for general page reading.

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?

It gives concrete routing guidance: use mode=value for a single field and snapshot with profile=fields for whole forms. That is a clear when-to-use rule tied to a named alternative, but there is no explicit statement of when this tool should not be used, nor guidance on choosing the visible vs text_content modes.

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