Skip to main content
Glama

html-to-markdown

Convert HTML to Markdown: transform supplied HTML into clean deterministic Markdown for LLM context, RAG, tool chaining and agent memory. Preserves headings, paragraphs, lists, blockquotes, links, code blocks and simple tables; no network fetch required. Costs $0.001 USDC on Base via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYes
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it enumerates what is preserved (headings, lists, blockquotes, links, code blocks, simple tables), asserts determinism, rules out network side effects, and discloses the $0.001 USDC/x402 cost. It omits truncation/size-limit behavior and error handling, which matters given the 500k/250k bounds.

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?

Dense but front-loaded: core action first, preservation list second, pricing last. Every sentence carries information, though the marketing-flavored use-case list ('RAG, tool chaining and agent memory') is somewhat padded.

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

Completeness3/5

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

No output schema and no annotations, so the description has to cover ground; it partially does by describing output structure and cost. However, with two undocumented parameters and an unmentioned truncation parameter, an agent cannot fully predict the call's behavior for large inputs.

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 0% for both parameters, so the description must compensate — and it does not. 'Supplied HTML' vaguely gestures at the required 'html' parameter, but 'max_chars' (a 100–250000 truncation control) is never mentioned, so the agent gets no guidance on output limiting.

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 verb+resource ('Convert HTML to Markdown') plus the output qualities ('clean deterministic Markdown'). The phrase 'no network fetch required' implicitly separates it from the URL-based sibling convertUrlToMarkdown, and the target format distinguishes it from html-to-text.

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 concrete use contexts (LLM context, RAG, tool chaining, agent memory) and notes that no network fetch is needed, so an agent knows this is the local-input path. It stops short of naming when NOT to use it or pointing to convertUrlToMarkdown/html-to-text as 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.