Skip to main content
Glama

html_to_markdown

Idempotent

Convert HTML content to Markdown format. Transform web pages and emails into Markdown with preserved structure for headings, tables, lists, code blocks, links, and images.

Instructions

Convert HTML to Markdown. Performs round-trip import of HTML content back to Markdown format. Handles headings, tables, lists, code blocks, links, images, and inline formatting. Useful for importing web content or converting HTML emails to Markdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesThe HTML content to convert to Markdown. Can be a full HTML document or a fragment.
output_pathNoOptional. Absolute or relative file path (e.g. './output.txt') where the result will be saved. Parent directories are created automatically. If omitted, the converted text content is returned directly in the response as a string. If provided, the file is written to disk and a JSON summary with { success, file_path, file_size_bytes, format } is returned instead.
Behavior4/5

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

While annotations declare idempotent/non-destructive hints, the description adds valuable behavioral context by enumerating specific HTML elements that are preserved (tables, code blocks, inline formatting), helping agents predict conversion fidelity. It aligns with annotations (idempotent 'round-trip' concept).

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?

Four sentences with clear information hierarchy: purpose → capability details → use cases. The 'round-trip import' phrase is slightly jargon-heavy but overall structure is efficient with minimal redundancy.

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?

Adequately covers the conversion capability and supported syntax, but lacks explicit documentation of return value behavior (file path vs string) in the description text itself, relying entirely on the parameter schema. No contradictions with annotations detected.

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?

Input schema has 100% description coverage, establishing a baseline of 3. The description focuses on functional capabilities rather than clarifying parameter semantics (e.g., html fragment vs document), which is acceptable given the comprehensive 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 clearly states the tool converts 'HTML to Markdown' with specific supported elements (headings, tables, lists, etc.), providing concrete scope. However, it fails to distinguish from sibling 'convert_to_md', which likely performs a similar function.

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?

Provides implicit usage guidance through concrete examples ('importing web content', 'converting HTML emails'), helping agents identify relevant contexts. However, it lacks explicit when-not-to-use guidance or comparison with the generic 'convert_to_md' alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/XJTLUmedia/MCP_Markdown_Formatter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server