Skip to main content
Glama

HTML to Markdown

html_to_markdown
Read-onlyIdempotent

Converts HTML you already have into clean Markdown of the main content without fetching anything. Resolves relative links via base_url and can include links or images.

Instructions

Convert HTML you already have into clean Markdown of its main content. Nothing is fetched.

Input Schema

NameRequiredDescriptionDefault
htmlYesThe page's HTML
base_urlNoURL the HTML came from, used to resolve relative links
max_charsNo
include_linksNo
include_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, closed-world, and idempotency, so the bar is lower; the description still adds two useful traits beyond them: it does main-content extraction (boilerplate/nav is stripped, not a whole-page dump) and it performs no network I/O. It omits truncation behavior via max_chars and how defaults for include_links/include_images are applied, which would have made this a 5.

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?

Two short sentences, zero filler, and the key differentiator ('Nothing is fetched') is front-loaded. Every clause earns its place.

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 does state the return shape ('clean Markdown of its main content'), which is the essential piece for a converter. What's missing is any note about output size limits (max_chars) and the opt-in nature of links/images, leaving some caller expectations unset for a 5-parameter tool.

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

Parameters2/5

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

Schema description coverage is only 40%: max_chars, include_links, and include_images carry no descriptions at all, and base_url is documented only in the schema. The description adds no meaning to any parameter — it doesn't say that max_chars truncates the output, that link/image inclusion is optional, or how base_url affects relative URLs — so it fails to compensate for the coverage gap.

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 concrete verb (Convert) and resource (HTML → clean Markdown of its main content), and explicitly carves itself out from the sibling fetch_url_as_markdown with 'HTML you already have' and 'Nothing is fetched.' An agent can distinguish the two tools without opening either schema.

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?

'HTML you already have' plus 'Nothing is fetched' gives a clear selection condition: use this when the HTML is in hand rather than retrieved from a URL. It stops short of naming the alternative (fetch_url_as_markdown) explicitly, so the routing is implied rather than stated.

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