Skip to main content
Glama

Agent Data Hub

HTML to Markdown: convert raw HTML you already have

page_html_to_markdown
Read-onlyIdempotent

Convert raw HTML (that the agent already fetched or generated) into clean Markdown for an LLM: headings, links, lists, bold/italic, code blocks and tables kept; scripts, styles, iframes and SVG removed. mode=article keeps only the main content (Mozilla Readability, drops nav/ads/footer). base_url makes relative links and images absolute. Returns title, markdown, word and link counts. No fetching — to convert a live URL use /v1/page/text. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "html": "<html>"
    },
    "name": "page_html_to_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesRaw HTML string or fragment (max 2 MB)
modeNofull (default) or article (main content only)
base_urlNoOptional page URL to resolve relative links, e.g. https://ex.com/a/

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds real behavioral detail beyond them: which elements survive vs get stripped, that article mode uses Mozilla Readability, that base_url resolves relative links, and pricing/free-tier limits. It stops short of describing fidelity caveats or failure modes (e.g. malformed HTML, 2 MB overflow behavior), which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then capabilities, then the no-fetch boundary, then return shape and pricing — a sensible ordering. It is a dense single block rather than separated points, so it reads as slightly crammed, but nearly every clause carries information.

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?

No output schema exists, and the description compensates by naming the returned fields (title, markdown, word and link counts). Input limits (2 MB), cost, and rate limits are also disclosed, leaving nothing an agent needs in order to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description still adds meaning: mode=article is explained as Readability main-content extraction, and base_url is explained as the base for resolving relative links and images. That is genuine semantic value on top of the schema rather than restatement.

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 ("Convert raw HTML ... into clean Markdown") and bounds the input to HTML the agent already has. It explicitly distinguishes itself from fetching tools ("No fetching — to convert a live URL use /v1/page/text"), so an agent can tell it apart from page_text and friends without opening a schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use condition (you already fetched or generated the HTML) plus an exclusion and named alternative for the live-URL case. mode=article vs full is also framed as a selection decision with the consequence spelled out (drops nav/ads/footer).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources