Skip to main content
Glama

text_html_to_markdown

Read-only

HTML to Markdown converter — Convert an HTML snippet or document to clean GitHub-flavored Markdown offline (for LLM context, docs, notes). html= URL-encoded HTML up to 100,000 characters. Handles headings, paragraphs, bold/italic/strikethrough, inline code and fenced code blocks with language (class language-x), nested ordered/unordered lists and task lists, blockquotes, links and images, GFM tables (caption, colspan, pipes escaped), definition lists, hr/br, HTML entities; drops script/style/svg/iframe, form controls and javascript: links. Options: base= absolute URL to resolve relative links and images, main=true keeps only / (strips nav/footer chrome), links=inline|reference|text, images=false, escape=false (no Markdown escaping). Returns markdown, page title, word/char counts and element stats. For a live page by URL use /v1/web/extract. Price: $0.002 USDC (Base, via x402).

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

Input Schema

NameRequiredDescriptionDefault
htmlYes<h2>Pricing</h2><p>Plans start at <strong>$5</strong>. See <a href='/docs'>the docs</a>.</p><ul><li>Fast</li><li>Cheap</li></ul>

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?

Goes well beyond the annotations: states a 100,000-character input ceiling, enumerates exactly which HTML constructs are handled versus dropped (script/style/svg/iframe, form controls, javascript: links), lists option flags with accepted values, and discloses return contents and per-call pricing. Annotations only cover read-only/non-destructive; the description carries the real behavioral burden. Minor tension: annotations mark openWorldHint=true while the text says 'offline', but the core read-only/non-destructive claims are consistent.

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 purpose, then input constraint, then handled/dropped elements, then options, then returns and price — a sensible order. The middle section is a dense run-on feature list that could be split, but nearly every clause carries information the agent needs.

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?

With no output schema, the description compensates by describing the return payload (markdown, page title, word/char counts, element stats). Cost, input limit, option semantics and element handling are all covered, leaving no material gap for correct invocation.

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?

The schema only defines 'html' with an example value, so the description must add the real constraints — that the input is URL-encoded and capped at 100,000 characters. It also documents option parameters (base, main, links, images, escape) with concrete accepted values, though their absence from the input schema is itself a slight documentation mismatch.

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 transformation ('Convert an HTML snippet or document to clean GitHub-flavored Markdown') and scopes it as 'offline', which separates it from live-page siblings like web_markdown. It also explicitly routes URL-based extraction elsewhere ('For a live page by URL use /v1/web/extract').

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 use-case context (LLM context, docs, notes) and an explicit exclusion with the alternative for live pages. The alternative is expressed as a route path rather than a sibling tool name, so the agent must map it, which keeps this just short of a 5.

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