Skip to main content
Glama

Convert HTML to Markdown

html_to_markdown
Read-only

Convert a web page URL or raw HTML into clean Markdown for AI-readable content, with header forwarding and output length limits. Not intended for JavaScript-rendered single-page apps.

Instructions

Convert a URL or raw HTML to Markdown. One of url or html. Not for JS SPAs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPage URL (alt. to html).
htmlNoRaw HTML (alt. to url).
headersNoHeaders to forward (Authorization, Cookie…).
maxCharsNoDefault 12000, max 50000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • addedInput schema / properties / headers
      Added value: +{
      +  "description": "Headers to forward (Authorization, Cookie…).",
      +  "type": "object"
      +}
    • changedInput schema / properties / html / description
      Previous value: -"Raw HTML string to convert directly (alternative to url)."New value: +"Raw HTML (alt. to url)."
    • changedInput schema / properties / maxChars / description
      Previous value: -"Max characters of Markdown to return (default 12000, max 50000)."New value: +"Default 12000, max 50000."
    • changedInput schema / properties / url / description
      Previous value: -"URL to fetch and convert (http:// or https://)."New value: +"Page URL (alt. to html)."
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes this as a safe read operation. The description adds a useful limitation about JS SPAs but does not disclose truncation behavior, auth forwarding expectations for headers, or output format. With annotations covering the safety profile, this is adequate but not rich.

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?

The description is two short sentences with zero wasted wording, and the core operation is front-loaded. Every sentence carries distinct information: the conversion action and the SPA exclusion.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter tool with a nested headers object, no output schema, and only a readOnly annotation, the description is too sparse. It does not explain maxChars truncation, what the returned Markdown looks like, or how forwarded headers affect authentication/cookies.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema documents all four parameters. The description adds one meaningful semantic constraint—exactly one of url or html must be supplied—that the schema only weakly implies. It does not add detail about headers or maxChars beyond 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?

The description states a specific verb and resource: 'Convert a URL or raw HTML to Markdown.' This is clear and distinguishes the tool from pure fetching/extraction siblings. However, it does not explicitly differentiate itself from tools like fetch_html or fetch_extract beyond the SPA limitation.

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?

It provides one negative condition ('Not for JS SPAs') and an input constraint ('One of url or html'), but gives no explicit routing guidance versus fetch_html, fetch_extract, or other sibling tools. Usage is implied rather than fully specified.

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