Skip to main content
Glama

fetch_html

Fetch a URL and return clean HTML with the DOM skeleton intact, removing scripts, styles, and inline JS handlers. Preserves tags, classes, and semantic layout for site migration tasks like converting WordPress to static HTML.

Instructions

Fetch a URL and return clean HTML with structure preserved — tags, classes, ids and semantic layout kept, but scripts, styles, comments, SVG/iframe blobs and inline JS handlers removed. Unlike fetch_extract (flattens to text) or html_to_markdown (converts to Markdown), this keeps the DOM skeleton so an agent can reconstruct the page as static HTML. Ideal for site migration (e.g. WordPress → static). Cost: $0.02 USDC on Base. First call free per wallet address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to fetch (http:// or https://).
maxCharsNoMax characters to return (default 16000, max 64000).
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses what is removed (scripts, styles, comments, SVG/iframe blobs, inline JS handlers) and what is preserved (tags, classes, IDs). Also notes cost ($0.02 USDC on Base) and first free call.

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?

Single paragraph with efficient structure: main action first, then details, comparisons, use case, and cost. Every sentence adds value with no redundancy.

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?

Given 2 parameters and no output schema, description fully explains output (clean HTML with structure preserved, what is removed) and provides cost and use context. Complete for agent decision-making.

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 has 100% coverage for both parameters (url, maxChars). Description adds value by specifying default and max for maxChars (default 16000, max 64000), which is not in schema. Provides practical context beyond schema.

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?

Clearly states the tool fetches a URL and returns clean HTML with structure preserved. Explicitly distinguishes from sibling tools (fetch_extract, html_to_markdown) by describing what is kept vs removed. Provides specific use case (site migration).

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?

Provides explicit comparisons with fetch_extract and html_to_markdown, telling when to use this tool instead. Mentions ideal for site migration. Does not explicitly state when not to use, but comparisons offer clear guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server