Skip to main content
Glama

get_page_text

Read-only

Extracts visible page text for scraping or inspection, caps inline output, and saves full untruncated text to a file when needed.

Instructions

Get the visible text of the page (document.body.innerText). Caps at maxLength (default 20000 chars); saveTo saves the full text to a file.

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_page_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveToNoSave the full untruncated text to a file instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-mcp/output/). Relative paths resolve against the current working directory.
previewNoNumber of characters of the saved text to return inline as a preview when saveTo is used. Omit for no preview.
maxLengthNoMax characters to return inline (default: 20000). Ignored when saveTo is used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • changedInput schema / properties / saveTo / description
      Previous value: -"Save the full untruncated text to a file instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory."New value: +"Save the full untruncated text to a file instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-mcp/output/). Relative paths resolve against the current working directory."
  2. Addedv0.9.10

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds real behavioral context beyond them: text comes from innerText (visible, rendered text, not markup), output is truncated by default at 20000 chars, and saveTo persists the full untruncated text to a file. It does not mention layout dependency or iframe/shadow-DOM limitations, keeping it from a 5.

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?

Two compact clauses, front-loaded with what is returned, followed by the truncation/persistence caveat. Zero filler.

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?

For a 3-optional-param read tool with no output schema, the description covers the return value, truncation behavior, and file-saving path clearly. Minor gaps remain around what innerText excludes (e.g. hidden text, iframes) but nothing essential to a correct call is missing.

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 the schema already documents all three parameters in detail. The description only restates the default cap and the saveTo effect, adding little beyond the schema; baseline 3 applies.

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+resource ('Get the visible text of the page') and pins down the exact semantics with '(document.body.innerText)', which distinguishes it from an HTML/source extractor or from evaluate_script. It does not explicitly name a sibling, so it stops short of 5.

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?

The mention of maxLength and saveTo implies the intended use (read page text, optionally persist large output), but there is no explicit when-to-use/when-not guidance or comparison to alternatives such as evaluate_script or screenshot_page. Usage is inferable rather than stated.

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