Skip to main content
Glama

Html to markdown

html_to_markdown
Read-onlyIdempotent

Convert raw HTML markup into clean Markdown (headings, links, tables, lists, fenced code, blockquotes, entities decoded; strips script/style and optional chrome). $0.002 per call over x402 (USDC on Base or Solana). Call once without payment for terms, then pass payment.

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": "html_to_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesRaw HTML markup to convert to Markdown (up to 512 KB).
baseUrlNoOptional base https:// URL to resolve relative links and images.
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).
stripChromeNoOptional: set true to omit nav/header/footer/aside/form chrome.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the bar is lower, yet the description still adds material behavior: cost ($0.002 per call), the x402/USDC payment requirement, script/style stripping, and optional chrome removal. The only notable omission is error or failure behavior, which is not covered.

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?

Two sentences, front-loaded with the core transformation and followed by the cost/auth prerequisite. The parenthetical feature list is dense but each item conveys real output behavior rather than filler.

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?

With no output schema, the description compensates by enumerating the Markdown constructs produced and what is stripped, plus the pricing and payment flow. Remaining gaps are minor: no error semantics and no explicit statement that no network fetch of the source document occurs.

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 coverage is 100%, so the baseline is 3; the description exceeds it by explaining the two-step payment protocol that gives `payment` operational meaning beyond 'signed x402 payment payload'. It also reinforces the 512 KB input bound, though `baseUrl` and `stripChrome` semantics are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource pair ('Convert raw HTML markup into clean Markdown') and enumerates the constructs handled, so an agent knows exactly what transformation is performed. It implicitly distinguishes itself from URL-fetching siblings like page_markdown by specifying 'raw HTML markup' as the input, but never names an alternative explicitly.

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

Usage Guidelines3/5

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

Gives a concrete procedural rule for the payment handshake ('Call once without `payment` for terms, then pass `payment`'), which is genuinely actionable. However, it offers no guidance on when to choose this over page_markdown or web_read, leaving tool selection to inference from the input type.

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