Skip to main content
Glama

MD2Doc

Convert markdown to PDF

convert_to_pdf

Converts markdown to a PDF rendered via headless Chrome (tables, code, and typography match the on-site preview) and returns a download URL valid for 10 minutes. For large files, POST to https://md2doc.com/mcp/upload and pass the returned id as markdown_upload_id.

Input Schema

NameRequiredDescriptionDefault
filenameNoOptional filename for the download, without the .pdf extension. Defaults to 'document'.
markdownNoThe markdown text to convert. Provide either this OR markdown_upload_id.
markdown_upload_idNoID returned by POST /mcp/upload (multipart file field 'file'). Single-use, expires after 10 minutes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that this is a non-destructive write operation with no open-world access. The description adds meaningful behavioral context beyond that: headless Chrome rendering, fidelity to the on-site preview, a download URL valid for 10 minutes, and a separate upload path for large files.

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 sentences, both front-loaded: the core conversion result first, the large-file escape hatch second. No wasted language.

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?

No output schema exists, but the description explains that the return value is a download URL valid for 10 minutes. It also covers the large-file input path; the remaining schema details are fully documented in the parameters.

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 all three parameters are already documented. The description adds the large-file workflow that explains why markdown_upload_id exists, but it largely restates the schema's upload endpoint reference rather than adding new semantics for filename or markdown.

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?

States a specific verb and resource ('Converts markdown to a PDF') and adds distinguishing detail about the rendering engine and output URL. It implicitly separates itself from convert_to_docx and convert_to_html by naming the PDF target, but it does not explicitly contrast with those siblings.

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 a useful large-file workflow ('For large files, POST to ... and pass the returned id'), but gives no explicit guidance on when to choose this tool over convert_to_docx, convert_to_html, or preview_markdown. Usage context 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources