Skip to main content
Glama

Render Markdown to PDF

render_pdf

Turn a Markdown document into a PDF and return the PDF. Each successful render counts as one document. Re-sending the same document with the same idempotency key returns the same PDF and is not counted again.

Input Schema

NameRequiredDescriptionDefault
pageNoThe page settings, as the front matter page: key takes them. Each key wins over the older flat key of the same setting and over the front matter. Placeholders in header, footer and numbering texts: {page}, {pages} (the number of the last page), {title}, {author}.
signNoSeal the PDF with your own certificate: {certificate: "name"} for a certificate stored on the account, or {p12, password} or {key, cert} to send one with the request. Optional reason, location and contact, up to 200 characters each. true is refused: name a stored certificate or send one with the request. false leaves the PDF unsealed. Sealing needs a paid plan.
widthNoOlder spelling of page.size, with height. The page width as a length such as 210mm; a number alone is in points.
footerNoOlder spelling of page.footer, which wins over it.
formatNoOlder spelling of page.size, which wins over it. A paper name such as A4 or A5 landscape. It wins over width and height.
headerNoOlder spelling of page.header, which wins over it.
heightNoOlder spelling of page.size, with width. The page height, written as width is.
marginNoOlder spelling of page.margin, which wins over it. A number alone is in points.
outputNoHow the PDF comes back. resource: in the result. upload: sent to upload_url, and the result is a receipt with the page count, size and hash.resource
featuresNoOptional switches for Markdown features: Mermaid diagrams, diagram pages, syntax highlighting, images, smart typography, task lists, emoji, math, barcodes, SVG, HTML blocks, bare links, indented code, the source attachment, hyphenation, the theme and the PDF standards: archive, accessible, mathml and standards. Every switch is on unless you set it to false, except diagram pages, the source attachment, archive, accessible and mathml, which are off unless you set them to true; the theme is light unless you set it to dark; standards is best_effort unless you set it to strict.
filenameNoA file name for the PDF, such as report.pdf. The result returns it, cleaned of characters a file name cannot hold, to save the PDF under. A document without a front matter title takes it, without .pdf, as its PDF title.
languageNoThe document's language as a tag such as en-GB. It sets the hyphenation rules, and the PDF records it as its document language. Omit it to use the language set in the document's front matter, if there is one.
markdownYesThe Markdown text of the document.
papersizeNoOlder spelling of page.size, as in Quarto. format wins when both are set.
resourcesNoWhat to do when an image or other linked file cannot be fetched. strict: the render fails. lenient: the PDF shows a placeholder box in its place.
upload_urlNoA pre-signed https URL on your own storage to upload the PDF to. Needed with output upload, and refused with any other output.
page_numberingNoOlder spelling of page.numbering, which wins over it: a text, a style 1, a, A, i or I, true for the default, or false.
idempotency_keyNoA per-document idempotency key. Reuse it only for the same document and options.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sign / description
      Previous value: -"Seal the PDF with your own certificate: {certificate: \"name\"} for a certificate stored on the account, or {p12, password} or {key, cert} to send one with the request. Optional reason, location and contact, up to 200 characters each. true uses the certificate chosen for the API key. false leaves the PDF unsealed. Sealing needs a paid plan."New value: +"Seal the PDF with your own certificate: {certificate: \"name\"} for a certificate stored on the account, or {p12, password} or {key, cert} to send one with the request. Optional reason, location and contact, up to 200 characters each. true is refused: name a stored certificate or send one with the request. false leaves the PDF unsealed. Sealing needs a paid plan."
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

The annotations already declare this is not read-only and not destructive. The description adds meaningful billing and idempotency behavior: each successful render counts as one document, and resending the same document with the same key returns the same PDF without counting again.

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?

The description is three concise sentences with the core operation front-loaded, followed by the counting and idempotency rules. There is no unnecessary wording.

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 complex 18-parameter render tool, the description establishes the input, output, billing count, and idempotency guarantee. The very rich schema carries parameter details, though the description could mention output modes or sibling-tool routing more explicitly.

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 18 parameters are already documented in the schema. The description only refers to the Markdown input and idempotency key at a high level, adding no new parameter semantics beyond the 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 states a clear verb and resource: turn a Markdown document into a PDF and return the PDF. It does not distinguish this from the sibling render_template tool, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains idempotency and document counting, but gives no explicit guidance on when to use render_pdf versus render_template or preview_template. It also does not state when not to use it.

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