Skip to main content
Glama

Markdown to Styled PDF Generator API - A4/Letter

markdown_to_pdf_api
Read-onlyIdempotent

Convert GitHub-Flavored Markdown (headings, tables, fenced code blocks, lists) into clean printable A4 or Letter PDF documents with configurable page margins. Offline sandboxed rendering (no external network requests), deterministic output, nothing stored. Built for AI agent report generation, technical docs, and SaaS export pipelines. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.01/call via x402 at https://radarbg.com/x402/markdown-to-pdf-api.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileName": "q4-summary.pdf",
      "marginMm": 18,
      "markdown": "# Q4 Operations Summary\n\nAll automated pipelines passed **99.9%** SLA targets.\n\n| Region | Invoices | Value (EUR) |\n|---|---|---|\n| DACH | 1,420 | 384,500 |\n| Benelux | 615 | 149,200 |\n\n```json\n{\"status\": \"ok\", \"errors\": 0}\n```\n",
      "pageSize": "A4"
    },
    "name": "markdown_to_pdf_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoOptional document title metadata.
fileNameNoOptional output file name (e.g. quarterly-report.pdf).
marginMmNoPage margin in millimeters (5-40).
markdownNoGitHub-Flavored Markdown text (provide either markdown or fileBase64, max 2 MB).
pageSizeNoPDF page size: A4 or Letter.A4
fileBase64NoBase64-encoded .md file (alternative to markdown).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations only cover safety/idempotency, and the description adds genuinely non-redundant operational facts: offline sandboxed rendering with no outbound network calls, deterministic output, nothing stored, 5 free calls/day per IP, and X-API-Key or x402 payment for higher volume. Minor tension exists with openWorldHint=true, but 'no external network requests' refers to the rendering sandbox rather than the billing endpoint, so this is not a real contradiction.

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?

The capability statement is front-loaded in the first sentence, followed by behavior and then pricing/auth detail; the example value in the schema supplies the format demonstration. The pricing URLs and tier copy are slightly promotional but still decision-relevant for an agent that must handle 401/402 responses.

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?

For a 6-parameter conversion tool with no output schema, the description omits what the call actually returns: a binary PDF, a base64 payload, or a URL, and whether the fileName has any effect on that. Auth, rate limits, input size limits and determinism are covered well, so the single remaining gap is the response shape.

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 the schema already documents markdown, fileBase64, fileName, title, marginMm (5-40) and pageSize (A4/Letter). The description only echoes the configurable margins and page sizes, adding no format rules, mutual-exclusivity note, or base64 encoding guidance beyond the schema, so the baseline 3 applies.

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 GitHub-Flavored Markdown ... into clean printable A4 or Letter PDF documents') and enumerates the Markdown constructs supported (headings, tables, fenced code blocks, lists). The input format alone differentiates it from siblings such as html_to_pdf_api, pdf_to_markdown, and images_to_pdf without the agent needing to open any 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 concrete usage contexts ('AI agent report generation, technical docs, and SaaS export pipelines') and the cost/auth conditions that select between free, API-key, and x402 access paths. It never names an alternative tool or states when not to use it (e.g. HTML input should go to html_to_pdf_api), so it falls short of a 5.

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