Skip to main content
Glama

fetch_html_to_text

Read-onlyIdempotent

Fetch any URL and convert HTML to plain text with block-level structure as newlines. Strip scripts, styles, and comments to get clean, readable content.

Instructions

GET a URL, decode the HTML, and return plain text with block-level structure preserved as newlines. Scripts, styles, and comments stripped; HTML entities decoded. Lighter than markdown when you only need the reading content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch
max_bytesNoMax response size in bytes (default 5MiB)
timeout_msNoRequest timeout in ms (default 10000)
user_agentNoUser-Agent override
max_redirectsNoMax redirect hops (default 5)
allow_private_hostsNoAllow loopback / private / link-local addresses (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral details beyond that: HTML entities are decoded, scripts/styles/comments are stripped, and block-level structure becomes newlines. It does not go into edge cases like HTTP redirects or error handling, but outcomes behavior for a read-only tool.

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 three sentences with no filler: first states the operation and return format, second gives processing details, and last gives the comparison use. It is front-loaded with the core action and output.

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?

With only one required parameter, fully documented parameters, and no output schema, the description explains what to expect back: plain text with newlines, stripped scripts, and decoded entities. It also provides the comparison that helps with sibling decisions. No return-value schema means a description that adequately describes output is complete.

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?

The input schema has 100% description coverage for all six parameters, including default values for max_bytes, timeout_ms, and max_redirects. The description does not add parameter-specific meaning, but the schema already carries the full burden. Baseline 3 is appropriate because the description does not compensate or conflict.

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 states a specific verb ('GET'), resource (URL/HTML), and output behavior ('return plain text with block-level structure preserved as newlines'). It also differentiates from the markdown-based sibling by describing what is stripped and by saying it is 'lighter than markdown.' This lets an agent distinguish it from fetch_html_to_markdown and fetch_reader without opening schemas.

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

Usage Guidelines4/5

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

The description gives a clear condition for use: 'Lighter than markdown when you only need the reading content.' This implicitly points to an alternative tool type but does not name siblings like fetch_html_to_markdown or fetch_reader directly, nor does it state when not to use the tool beyond that condition. Clear context, but no explicit exclusion or alternative routing.

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