Skip to main content
Glama

fetch_html_to_markdown

Read-onlyIdempotent

Fetch a web page, strip scripts and navigation, and convert HTML to clean markdown for compact LLM input. Blocks private hosts and follows redirects.

Instructions

GET a URL, decode the HTML, and convert to clean markdown (headings, lists, links, code fences). Scripts, styles, iframes, nav, footer, and aside elements are stripped. Intended for feeding web pages into an LLM cheaply -- markdown is usually 3-8x smaller than raw HTML. Follows redirects, respects size/timeout limits, and blocks private-host requests by default.

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

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

Annotations already mark the tool as read-only/idempotent/non-destructive, and the description adds substantial behavioral context beyond them: which elements are stripped, that redirects are followed, that size/timeout limits are respected, and that private-host requests are blocked by default. These are exactly the runtime traits an agent needs to predict before calling.

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?

Three dense sentences with no filler: action first, then transformation specifics, then use case and runtime constraints. Every sentence earns its place and the most decision-relevant information is front-loaded.

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?

For a read-only fetch-and-convert tool with no output schema, the description sufficiently covers input, processing, output format, element stripping, redirect/limit behavior, and security defaults. An agent has everything needed to call it correctly without additional documentation.

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%, so the schema already documents all six parameters. The description adds context about limits and private-host blocking, but doesn't need to elaborate further; baseline 3 is appropriate when the schema carries the parameter documentation burden.

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 ('GET a URL') and a concrete output ('convert to clean markdown'), with explicit transformations like stripping scripts, styles, iframes, nav, footer, and aside. This clearly differentiates it from raw-fetch siblings and from fetch_html_to_text, which would produce plain text rather than 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?

Gives a clear intended use case: 'feeding web pages into an LLM cheaply' with a concrete benefit ('3-8x smaller than raw HTML'). It doesn't explicitly name alternatives or state when not to use it, but the context is strong enough for an agent to select it appropriately.

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