Skip to main content
Glama

fetch_html_to_text

Read-onlyIdempotent

Fetches a webpage and converts HTML to clean plain text, retaining block structure as newlines and stripping scripts, styles, and comments.

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_msNoTimeout in ms for the request, covering DNS, every redirect hop and the body (default 10000)
user_agentNoUser-Agent override
max_redirectsNoMax redirect hops (default 5)
allow_private_hostsNoAllow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • changedInput schema / properties / allow_private_hosts / description
      Previous value: -"Allow loopback / private / link-local addresses (default false)"New value: +"Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Request timeout in ms (default 10000)"New value: +"Timeout in ms for the request, covering DNS, every redirect hop and the body (default 10000)"
  2. First observedv0.6.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral detail: it strips scripts, styles, and comments, decodes HTML entities, and preserves block-level structure as newlines. This goes beyond annotations and informs the agent of processing specifics.

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 sentences, zero filler. The first sentence delivers the core action and output format, and the second provides a concise comparative note. All information earns its place and is front-loaded.

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?

The tool is simple: it fetches HTML and returns plain text. The description covers the output format and processing, and the schema covers all parameters. Annotations cover safety. It could mention error handling or redirect behavior, but those are implied by parameters and not essential for a read-only fetch tool. Overall, it is complete enough for correct invocation.

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%, meaning every parameter (url, max_bytes, timeout_ms, user_agent, max_redirects, allow_private_hosts) already has a clear description. The tool description adds no additional parameter-specific semantics, so it stays at the baseline of 3 for fully documented schemas.

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 opens with a clear verb-resource pair ('GET a URL, decode the HTML, and return plain text') and specifies the output format precisely. It also distinguishes itself from a sibling by noting it is 'Lighter than markdown when you only need the reading content,' which helps an agent pick between this and fetch_html_to_markdown.

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 provides a usage hint by contrasting with markdown ('when you only need the reading content'), implying when to prefer this tool. However, it does not explicitly state when not to use it or name alternatives beyond markdown, leaving some inference to the agent.

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