Skip to main content
Glama

Markdown to PDF

MarkdowntoPDF
Read-only

Markdown to PDF: Markdown to PDF is a PDF generator API that converts markdown text into professionally formatted PDF documents and returns a temporary download URL for each file. Paid plans can set the paper size, orientation and margins, style the document with their own CSS, and print a header and footer with page numbers on every page. (Cost: 30 credits)

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": {
      "markdown": "<markdown>"
    },
    "name": "MarkdowntoPDF"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoStylesheet applied to the rendered markdown, e.g. body { font-family: Georgia, serif } table { border-collapse: collapse }
formatNoPaper sizeA4
markdownYesMarkdown text to convert (max 100,000 characters)
landscapeNoSet to true for landscape orientation
marginTopNoThe top margin in inches
marginLeftNoThe left margin in inches
marginRightNoThe right margin in inches
marginBottomNoThe bottom margin in inches
footerTemplateNoHTML printed at the bottom of every page, with the same placeholders as headerTemplate, e.g. <span class="pageNumber"></span> of <span class="totalPages"></span>
headerTemplateNoHTML printed at the top of every page. Spans with class pageNumber, totalPages, date or title are filled in. Use inline styles with a font-size (Chromium defaults to a tiny font) and leave room with marginTop

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNoError message, null on success
statusNo"ok" on success

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnly/openWorld/non-destructive; the description adds genuinely new behavior: outputs are temporary download URLs, advanced formatting is plan-gated, and each call costs 30 credits. It does not contradict readOnlyHint (no data is mutated), and the credit cost is exactly the kind of operational detail annotations cannot carry.

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?

Two sentences, front-loaded with the core conversion action and followed by capability and cost details. The leading 'Markdown to PDF: Markdown to PDF is...' repeats the name and title verbatim, which is wasted space in an otherwise tight description.

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 10 parameters at full schema coverage and an output schema present, the description covers what an agent most needs: what it produces, that URLs are temporary, plan gating, and credit cost. Minor gaps remain around failure modes (e.g., what happens when the character limit is exceeded) and whether the URL expires on a fixed schedule.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema cannot: the formatting parameters (css, format, landscape, margins, headerTemplate/footerTemplate) are restricted to paid plans. It omits the 100,000-character markdown limit, but that is already documented in the schema.

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 ('converts markdown text into professionally formatted PDF documents') and names the return artifact ('temporary download URL'). Input format (markdown) and output format (PDF) make it self-evidently distinct from siblings such as MarkdowntoHTML, MarkdowntoImage, and OfficetoPDF.

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?

The description implies context by noting that advanced options (paper size, orientation, margins, CSS, header/footer) are available on paid plans, which helps an agent anticipate credit gating. However, it never says when to choose this over MarkdowntoHTML or WebsitetoPDF, nor does it state when not to use it or any prerequisites.

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.