Skip to main content
Glama

content_get_text

Extracts rendered text from a Firefox tab's main document, returning readable page content with optional max_length truncation and ellipsis.

Instructions

Read the current page body's rendered text (document.body.innerText).

Use this for readable page content, or content_get_html for markup. Reads the main document without changing it; does not include iframe documents or wait for future lazy-loaded content. Restricted Firefox pages that block content scripts cannot be read.

max_length slices the extracted text by character count and adds an ellipsis when truncated; omission returns all extracted text.

profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

Input Schema

NameRequiredDescriptionDefault
tab_idYesID of the tab to get content from
max_lengthNoOptional maximum length of text to return (default: unlimited)
profile_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description does the heavy lifting: it declares the operation is non-mutating ('without changing it') and enumerates real behavioral limits (iframes excluded, lazy content not awaited, restricted Firefox pages unreadable). It stops short of describing error signals or any cost/latency characteristics, so not a full 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?

Front-loaded with the core action and primitive, then a usage/alternative sentence, then constraints, then per-parameter notes. Four short paragraphs with no repetition and nothing that could be cut without losing routing or behavioral information.

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?

An output schema exists, so return values need no explanation, and every other decision an agent must make — which tool, whether the page type is readable, how to size the output, where the ID comes from — is answered in the description.

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 67%; profile_id has no description in the schema, and the description compensates well by stating it is required, that it comes from profiles_list, and that all object IDs are profile-local and non-portable. max_length semantics (character slicing plus ellipsis on truncation, null = full text) are added beyond the schema's brief note; only tab_id gets no extra meaning.

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 ('Read the current page body's rendered text') and even gives the exact extraction primitive (document.body.innerText), removing ambiguity about what 'text' means. It explicitly names the sibling content_get_html as the markup alternative, so an agent can distinguish it without opening either schema.

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?

'Use this for readable page content, or content_get_html for markup' gives an explicit routing rule to the alternative. The description also lists when-not conditions: no iframe documents, no waiting for lazy-loaded content, and restricted Firefox pages that block content scripts.

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