Skip to main content
Glama

Markdown to HTML API - HTML to Markdown, GFM, safe

markdown_html_converter
Read-onlyIdempotent

Convert Markdown to HTML or HTML to Markdown in one call. No extra key or account needed. Markdown -> HTML: GitHub-style tables, task lists, strikethrough, fenced code with language class, heading ids + table of contents, link titles; XSS-safe by default (raw HTML in the Markdown is shown as text, javascript:/data: links become #), optional full HTML page. HTML -> Markdown: headings, lists, tables, code, links, images; scripts/styles dropped; mainContent=true keeps only the article (drops menus, footers, cookie banners) for clean LLM/RAG input. Auto-detects the direction from 'text'. Returns stats + token estimate, nothing stored, ~1-50 ms. For AI agents, CMS, newsletter and docs pipelines, n8n/Make. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/markdown-html-converter.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "# Release notes\n\nVersion **2.1** is out. See [docs](https://example.com/docs \"Docs\").\n\n## Changes\n\n- [x] Faster search\n- [ ] Dark mode\n\n| Plan | Price |\n|---|---|\n| Free | $0 |\n| Pro | $9 |\n"
    },
    "name": "markdown_html_converter"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTarget format when you send 'text'auto
tocNoMarkdown -> HTML: return the table of contents (level, text, id of every heading)
htmlNoHTML text to convert to Markdown (a whole page or a fragment, max 1,000,000 chars)
textNoInstead of markdown/html: any text; the direction is detected automatically (or set 'to')
titleNoMarkdown -> HTML with fullPage: page <title> (default = first H1)
fullPageNoMarkdown -> HTML: return a complete HTML page (doctype, title, readable CSS) instead of a fragment
markdownNoMarkdown text to convert to HTML (max 1,000,000 chars)
mainContentNoHTML -> Markdown: keep only the main article text (drops nav, footer, sidebars)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld; the description adds substantive behavior they cannot express: XSS-safe default with raw HTML rendered as text, javascript:/data: links rewritten to #, scripts and styles dropped, nothing stored, ~1-50 ms latency. It also discloses the rate limit (5 calls/day per IP) and the two paid auth paths (X-API-Key or x402), which directly affect whether a call will succeed.

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?

It is front-loaded with the one-line purpose, then split into clearly labeled "Markdown -> HTML:" and "HTML -> Markdown:" blocks, so it reads efficiently despite its density. The pricing/URL tail is long and partly promotional, though the auth and quota information in it is genuinely actionable.

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 an 8-parameter, multi-mode tool with no required arguments and no output schema, the description covers direction selection, safety behavior, auth/quota, latency, and even the return shape ("stats + token estimate"). An agent has everything needed to choose the right mode and predict success or failure.

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 already 100%, so the baseline is 3, but the description adds meaning beyond the field docs: mainContent is framed as dropping cookie banners and menus 'for clean LLM/RAG input', and toc/fullPage are tied to the Markdown-to-HTML direction. The enrichment is real but modest, since most parameter semantics are already in the 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?

The opening sentence gives a specific verb and both resources: "Convert Markdown to HTML or HTML to Markdown in one call." It immediately establishes the bidirectional scope, which is what separates it from one-directional siblings like json_to_yaml or case_converter.

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?

It explains how to select direction (send 'markdown' or 'html' for explicit control, or any text via 'text' with auto-detection or an explicit 'to'), and names concrete use contexts (LLM/RAG input, CMS, newsletter, docs pipelines, n8n/Make). It stops short of any exclusion or 'use X instead' routing, so it is clear context without alternatives.

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