Skip to main content
Glama

read_text

Extract visible text from the current web page, or pass a CSS selector to target and retrieve text from a specific element.

Instructions

Visible text of the current page, or of the first element matching the CSS selector if given.

Input Schema

NameRequiredDescriptionDefault
selectorNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.46

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. 'Visible text' usefully discloses that non-rendered content is skipped, but nothing is said about what happens when the selector matches nothing, whether it throws or returns empty, or whether any page navigation is triggered.

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?

A single front-loaded sentence with the default behavior folded into a subordinate clause. Nothing redundant and nothing padded.

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

Completeness3/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 shape need not be explained, and there is only one optional parameter. The remaining gap is a no-match / empty-result behavior, which matters for an agent deciding whether to fall back to read_html.

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 description coverage is 0% (the selector param is an undescribed string with an empty default), so the description must compensate. It does so meaningfully: selector is a CSS selector, matching is first-element-only, and omitting it defaults to the whole page's 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?

States a specific verb+resource ('read_text') and scopes it: visible text of the current page, or of the first element matching a CSS selector. That contrasts implicitly with the sibling read_html (raw markup vs rendered text), though it never names the sibling.

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 word 'visible' implies rendered text extraction as opposed to markup, which nudges toward read_html for structure. But there is no explicit when-to-use statement, no exclusion (e.g., iframes, hidden elements), and no alternatives named.

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