Skip to main content
Glama

Page text

get_text_content
Read-only

Extracts a page's visible text without HTML markup, paginated by character offset. Use it to read or scrape page copy, with a diagnosis returned when the result is empty.

Instructions

Get the page's visible text, without any HTML markup.

Use for reading or extracting page copy. Text hidden by CSS is excluded, and no selectors are returned, so use get_interaction_tree if you intend to interact. Same pagination contract as get_content. An empty result carries a diagnosis saying whether the page is still loading, has no body, keeps its text in iframes or shadow roots, or really is blank. Returns one page of text plus the offset to continue from.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_text_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNoTab id from list_tabs or new_tab to act on, instead of the active tab. The active tab does not change. Omit to use the active tab. Example: 'tab_2'
offsetNoCharacter offset to start from, for paging through long text. Example: 0
max_charsNoMaximum characters of text to return in this call. Pass a larger value or page with offset to read more. Example: 10000

Output Schema

NameRequiredDescriptionDefault
endYesOne past the last character of this slice.
textYesThe slice itself.
totalYesLength of the whole text.
offsetYesFirst character of this slice.
summaryYesOne line saying what happened.
diagnosisNoOnly on an empty result: why the page has no visible text, and what to do.
next_offsetNoOffset to request next; absent on the last slice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, yet the description adds substantial behavior: CSS-hidden text is excluded, no selectors are returned, pagination matches get_content, and empty results carry a diagnosis covering loading/iframe/shadow-root/blank states. That is real disclosure beyond the structured fields.

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?

Front-loaded with the core action, then layered constraints, alternative routing, and edge-case behavior in four short sentences; no filler and no restatement of the title.

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?

Complete for a read-only extraction tool: scope, exclusions, alternative, paging behavior, and empty-result diagnostics are all covered, and an output schema exists to carry return shape.

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 parameters are already documented, but the description adds the paging contract ('one page of text plus the offset to continue from') that explains how offset and max_chars relate across calls. That is meaning beyond the schema's per-field examples.

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 ('Get the page's visible text') and immediately bounds it with 'without any HTML markup,' which cleanly separates it from markup/selector-returning tools in the sibling set.

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

Usage Guidelines5/5

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

Explicitly says when to use it ('reading or extracting page copy') and when not to ('use get_interaction_tree if you intend to interact'), naming the alternative and the condition that selects it.

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