Skip to main content
Glama

get_page_text

Read-only

Extract visible text from the current web page. Use saveTo to write the full untruncated content to a file, with optional inline preview.

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.

Input Schema

TableJSON 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-devtools-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.
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds crucial behavioral details: maxLength truncation (default 20000 chars) and the saveTo option to write the full text to a file. This discloses side effects (file saving) and limitations not captured by the annotation.

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?

The description is a single, well-structured sentence that front-loads the purpose and then summarizes key behaviors. Every word earns its place, with no redundancy or fluff.

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?

Given the simple nature of this read-only tool, the description covers purpose, truncation behavior, and file-saving option. With no output schema, the description still tells users what to expect (visible text, limited by maxLength). It is complete and self-sufficient.

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?

The schema already provides 100% coverage for parameters, so baseline is 3. The description adds semantic context by explaining the default maxLength and the relationship between saveTo and inline truncation, which enhances understanding beyond raw schema.

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?

The description clearly identifies the action ('Get'), the resource ('visible text of the page'), and specifies implementation via document.body.innerText. This distinguishes it from sibling tools like screenshot_page (visual) and evaluate_script (general JS execution).

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 description implies usage context (retrieving visible text) but does not explicitly mention when to use this tool over alternatives or provide exclusions. Sibling tools like take_snapshot or evaluate_script could also retrieve text, but no comparison is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mozilla/firefox-devtools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server