Skip to main content
Glama
formfeed

formfeed

Official

Turn Markdown into a PDF

markdown_to_pdf

Converts a Markdown document into a PDF without a template, returning the render status and download URL for reports, notes, or written answers.

Instructions

Turns a Markdown document into a PDF without a template, e.g. a report, notes or an answer you wrote, and returns the render with status and download_url. It reads GitHub Flavored Markdown (tables, task lists, strikethrough) and footnotes; a YAML front matter block gives the title, author, subject and keywords, else the first heading is the title; a line \newpage starts a new page. Raw HTML in the text is shown as text. A picture named without an address (Logo) is a file of the workspace library, uploaded in Formfeed; with path, a picture beside the file is sent along instead. The headings become the PDF bookmarks by default, and pdf_ua checks the file against PDF/UA-1 before it is delivered. To fill a template with data, use render; to convert an office file, use convert_to_pdf. Every call is a new render: one unit per started five pages on a live key or for a signed-in agent, free with a test key; every plan.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "markdown_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoA stylesheet after the theme, e.g. h1 { color: #0f766e }; the document is inside div.ff-markdown
pathNoAbsolute path of a Markdown file on this machine; pictures inside its folder are sent along
waitNotrue waits for a render that continues in the background; false returns it as it is, to check later with get_render
paperNoPaper size; A4 when left out
themeNodocument (default) styles the text, in the brand kit fonts and colour where the workspace has one; none leaves the styling to css
titleNoThe PDF title; left out, the front matter title or the first heading
pdf_uaNoMakes the file a PDF/UA-1 document checked by veraPDF; a file that fails is not delivered and the result names the rules
outlineNoBookmarks from the headings (default true); they cost nothing
filenameNoName of the PDF behind download_url, e.g. report.pdf
markdownNoThe document as Markdown text, up to 1 MB; pass this or path
landscapeNoLandscape pages

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
formNoWhat fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran
pdfaNoThe PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it
errorYesWhy a failed render failed
unitsYesUnits the render counted
outputNoThe format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.26
    • addedOutput schema / properties / form
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran",
      +  "properties": {
      +    "filled": {
      +      "type": "number"
      +    },
      +    "skipped": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "field": {
      +            "type": "string"
      +          },
      +          "reason": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "reason"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "warnings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "code"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "xfa_removed": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "filled",
      +    "skipped",
      +    "warnings",
      +    "xfa_removed"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / output
      Added value: +{
      +  "description": "The format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image",
      +  "type": "string"
      +}
  2. Addedv0.3.24

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses that raw HTML renders as plain text, how images resolve (workspace library vs. sibling file), that pdf_ua failures block delivery, that bookmarks cost nothing, and the billing unit ('one unit per started five pages', free with a test key). The annotation profile (non-readonly, non-idempotent) is corroborated by 'every call is a new render'. The one gap is failure/error modes beyond pdf_ua.

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?

Front-loaded with the core action and tightly packed with substantive detail; almost every clause carries information. Some phrasing is awkward and compressed ('every plan', 'A picture named without an address'), and the billing sentence is longer than needed, but nothing is redundant enough to cut wholesale.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter render tool with an output schema, this covers what matters: input formats, image/asset resolution, page breaks, accessibility validation, cost model, and the async path via wait/get_render. Return values are briefly framed (status, download_url) and need no further explanation given the output schema.

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; the description earns above that by explaining cross-parameter behavior the schema cannot express — markdown vs. path exclusivity, how pictures are resolved per-image depending on whether a path appears, and the front-matter-to-title fallback. It does not restate per-parameter definitions, which is appropriate.

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 (turns a Markdown document into a PDF, no template required) and immediately scopes what it accepts (GFM, footnotes, front matter, \newpage). It explicitly separates itself from render and convert_to_pdf, so an agent can distinguish it from siblings without opening 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 Guidelines5/5

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

Gives explicit routing conditions: 'to fill a template with data, use render; to convert an office file, use convert_to_pdf'. It also explains when to use wait=false (check later with get_render), which is exactly the decision an agent must make at call time.

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