Skip to main content
Glama

html_to_markdown

Convert an HTML string into Markdown while preserving the full page structure and all content. Choose this for faithful structural conversion rather than article-only extraction.

Instructions

Convert an HTML string to Markdown as-is (preserves the full page structure).

This performs a faithful structural conversion — no content is stripped. Use extract_article instead if you want to pull just the article body.

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

Input Schema

NameRequiredDescriptionDefault
htmlYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 it does disclose the key behavioral trait: the conversion is faithful and nothing is stripped. It does not mention handling of malformed HTML, size limits, or any failure modes, which is the remaining gap for a zero-annotation tool.

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 short sentences, front-loaded with the core behavior and scope, then the alternative. No filler and nothing repeated.

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?

For a single-parameter conversion tool with an output schema, the description covers purpose, fidelity behavior, and the main alternative. Only edge-case behavior (invalid input, limits) is unaddressed, which is a minor omission given the tool's simplicity.

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?

There is one parameter ('html') with 0% schema description coverage, but the name plus the description's 'HTML string' phrasing make its meaning obvious. It adds no detail on whether a full document or a fragment is expected, or any size constraints.

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 and resource ('Convert an HTML string to Markdown') plus the scope qualifier 'as-is (preserves the full page structure)', and explicitly distinguishes itself from extract_article. An agent can tell this apart from the article-extraction sibling 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?

Gives an explicit routing rule: use extract_article instead if you only want the article body. That is clear when-to-use-other guidance, though it doesn't state any condition under which this tool is inappropriate (e.g. non-HTML input or fragments).

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