Skip to main content
Glama

Convert HTML to Markdown

html_to_markdown
Read-only

Free, read-only. Convert a fetched URL or an HTML string you pass (one of the two) to Markdown: headings, links, lists, emphasis, code, quotes. Drops nav, header, footer, aside, script and style. Returns text, cut at maxChars with a marker. Runs no JavaScript: SPAs return an empty shell. Tables become plain text.

Input Schema

NameRequiredDescriptionDefault
urlNoPage URL to fetch. Not with html.
htmlNoHTML text to convert. Not with url.
headersNoHeaders to forward (Authorization, Cookie…).
maxCharsNoOutput cap, chars. Default 12000, max 50000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / html / description
      Previous value: -"Raw HTML (alt. to url)."New value: +"HTML text to convert. Not with url."
    • changedInput schema / properties / maxChars / description
      Previous value: -"Default 12000, max 50000."New value: +"Output cap, chars. Default 12000, max 50000."
    • changedInput schema / properties / url / description
      Previous value: -"Page URL (alt. to html)."New value: +"Page URL to fetch. Not with html."
  2. Changed4 schema fields changed
    • addedInput schema / properties / headers / description
      Added value: +"Headers to forward (Authorization, Cookie…)."
    • changedInput schema / properties / html / description
      Previous value: -"Alt. to url."New value: +"Raw HTML (alt. to url)."
    • addedInput schema / properties / maxChars / description
      Added value: +"Default 12000, max 50000."
    • addedInput schema / properties / url / description
      Added value: +"Page URL (alt. to html)."
  3. Changed1 schema field changed
    • addedInput schema / properties / headers
      Added value: +{
      +  "type": "object"
      +}
  4. Changed3 schema fields changed
    • changedInput schema / properties / html / description
      Previous value: -"Raw HTML string to convert directly (alternative to url)."New value: +"Alt. to url."
    • removedInput schema / properties / maxChars / description
      Removed value: -"Max characters of Markdown to return (default 12000, max 50000)."
    • removedInput schema / properties / url / description
      Removed value: -"URL to fetch and convert (http:// or https://)."
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint; the description adds substantial behavior beyond that: which elements are discarded, truncation at maxChars with a visible marker, no JavaScript execution so SPAs return an empty shell, and table flattening. These are exactly the failure modes and output-shape facts an agent needs before calling.

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?

Three dense sentences with zero throat-clearing. Safety and mutuality constraints are front-loaded, then output scope, then limitations – a sensible order for an agent scanning before invocation.

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 a read-only converter with no output schema, the description supplies the return type ('text'), the truncation behavior, and the JS limitation that determines whether the tool is even viable for a given page. The empty-shell warning on SPAs is the kind of edge case that otherwise causes silent bad results.

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 baseline is 3. The description adds two things beyond the schema: it reiterates the url/html mutual exclusivity as a top-level constraint, and it reveals that maxChars truncation is signaled by an inserted marker, which the schema does not say. It says nothing extra about headers.

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 description opens with a specific verb and resource ('Convert ... to Markdown') and then enumerates the exact conversion scope: headings, links, lists, emphasis, code, quotes. It distinguishes itself from the sibling fetch tools by framing both a URL-fetch path and a raw-HTML path, and from fetch_extract by naming what gets stripped.

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 gives clear context for when this applies: post-processing a fetched page or converting a string you already have ('one of the two'). It cues the workflow with 'a fetched URL' and the stripped-element list, but never names fetch_html explicitly as the upstream sibling or states when to prefer it over fetch_extract.

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.