Skip to main content
Glama

Render markdown

render_markdown

Create a PDF document from markdown text. Use when the user asks for a PDF of written content, such as notes, a report, a summary, a letter, a list, a checklist or a diagram. Supports GitHub-flavored markdown, tables, task lists, Mermaid diagrams (flowcharts, sequence and other diagram types), code highlighting and images; the output is a tagged, accessible PDF (PDF/A-2A + PDF/UA-1). Uses the user's makesPDF credits: 1 credit per 10 pages. Returns JSON metadata (pageCount, creditsDeducted, creditsRemaining, artifactId, downloadUrl) plus the PDF bytes as an embedded base64 resource and a resource_link to downloadUrl. On the Free and Hobbyist plans, unless the account holds Growth credits, each page carries a small makespdf.com link. Mirrors POST /api/v1/md.

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": "render_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
optionsNoOptional render settings. Anything omitted falls back to YAML frontmatter in the markdown, then to the runtime default.
markdownYesThe GitHub-flavored markdown document to render. YAML frontmatter may set the same keys as `options`. Up to 200KB of text; inline data: image payloads do not count toward that.

Output Schema

NameRequiredDescriptionDefault
renderMsYesServer-side render time in milliseconds.
pageCountYesPages in the rendered PDF.
sizeBytesYesSize of the PDF in bytes.
artifactIdNoID of the stored render artifact, also served at GET /api/v1/artifacts/{id}/pdf. Absent when the artifact could not be recorded.
downloadUrlNoShort-lived signed URL that downloads the rendered PDF with no credential of its own. Absent when the artifact could not be recorded.
creditsDeductedYesCredits charged for this render: 1 per 10 pages, rounded up; 0 when the caller is not billed.
creditsRemainingYesCredit balance after the charge; null when the caller is not billed.
downloadUrlExpiresAtNoWhen `downloadUrl` stops working, as an ISO 8601 timestamp.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / downloadUrl
      Added value: +{
      +  "description": "Short-lived signed URL that downloads the rendered PDF with no credential of its own. Absent when the artifact could not be recorded.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / downloadUrlExpiresAt
      Added value: +{
      +  "description": "When `downloadUrl` stops working, as an ISO 8601 timestamp.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / artifactId / description
      Previous value: -"ID of the stored render artifact; pass it to report_feedback or download it again via GET /api/v1/artifacts/{id}/pdf. Absent when the artifact could not be recorded."New value: +"ID of the stored render artifact, also served at GET /api/v1/artifacts/{id}/pdf. Absent when the artifact could not be recorded."
  3. Changed13 schema fields changed
    • addedInput schema / properties / options / properties / fontFamily / default
      Added value: +"Inter"
    • changedInput schema / properties / options / properties / fontFamily / description
      Previous value: -"Body font: 'Inter' (geometric sans, the default) or 'NotoSans' (humanist sans). Code blocks always use a monospace font."New value: +"Body font: 'Inter' (geometric sans) or 'NotoSans' (humanist sans). Code blocks always use a monospace font."
    • addedInput schema / properties / options / properties / fontSize / default
      Added value: +10
    • changedInput schema / properties / options / properties / fontSize / description
      Previous value: -"Body text size in points. Headings, spacing and line height scale from it. Default 10."New value: +"Body text size in points. Headings, spacing and line height scale from it."
    • changedInput schema / properties / options / properties / margins / description
      Previous value: -"Page margins in points, [top, right, bottom, left]."New value: +"Page margins in points, [top, right, bottom, left]. When omitted, frontmatter `margins` applies, else 40 on every side."
    • addedInput schema / properties / options / properties / pageNumberPosition / default
      Added value: +"right"
    • changedInput schema / properties / options / properties / pageNumberPosition / description
      Previous value: -"Footer alignment when pageNumbers is set. Default 'right'. Ignored without pageNumbers."New value: +"Footer alignment of the page number. Ignored without pageNumbers."
    • addedInput schema / properties / options / properties / pageSize / default
      Added value: +"A4"
    • changedInput schema / properties / options / properties / pageSize / description
      Previous value: -"Paper size. Default 'A4'."New value: +"Paper size for every page."
    • addedInput schema / properties / options / properties / theme / default
      Added value: +"github"
    • changedInput schema / properties / options / properties / theme / description
      Previous value: -"Visual style. 'github' (the default): lighter semibold headings, underlined h1/h2, zebra-striped bordered tables. 'default': heavier bold headings with no underlines or striping."New value: +"Visual style. 'github': lighter semibold headings, underlined h1/h2, zebra-striped bordered tables. 'default': heavier bold headings with no underlines or striping."
    • changedInput schema / properties / options / properties / title / description
      Previous value: -"Document title written to the PDF metadata. PDF viewers show it in the window title instead of the file name."New value: +"Document title written to the PDF metadata. PDF viewers show it in the window title instead of the file name. When omitted, frontmatter `title` applies, else 'Document'."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Render and billing metadata. The PDF itself is the embedded resource in `content`.",
      +  "properties": {
      +    "artifactId": {
      +      "description": "ID of the stored render artifact; pass it to report_feedback or download it again via GET /api/v1/artifacts/{id}/pdf. Absent when the artifact could not be recorded.",
      +      "type": "string"
      +    },
      +    "creditsDeducted": {
      +      "description": "Credits charged for this render: 1 per 10 pages, rounded up; 0 when the caller is not billed.",
      +      "type": "integer"
      +    },
      +    "creditsRemaining": {
      +      "description": "Credit balance after the charge; null when the caller is not billed.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "pageCount": {
      +      "description": "Pages in the rendered PDF.",
      +      "type": "integer"
      +    },
      +    "renderMs": {
      +      "description": "Server-side render time in milliseconds.",
      +      "type": "integer"
      +    },
      +    "sizeBytes": {
      +      "description": "Size of the PDF in bytes.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "pageCount",
      +    "sizeBytes",
      +    "renderMs",
      +    "creditsDeducted",
      +    "creditsRemaining"
      +  ],
      +  "type": "object"
      +}
  4. Changed10 schema fields changed
    • changedInput schema / properties / markdown / description
      Previous value: -"GitHub-flavored markdown source. Max 200KB of text; inline data: image payloads are excluded from that budget."New value: +"The GitHub-flavored markdown document to render. YAML frontmatter may set the same keys as `options`. Up to 200KB of text; inline data: image payloads do not count toward that."
    • changedInput schema / properties / options / properties / author / description
      Previous value: -"PDF /Author metadata."New value: +"Document author, written to the PDF metadata."
    • addedInput schema / properties / options / properties / fontFamily / description
      Added value: +"Body font: 'Inter' (geometric sans, the default) or 'NotoSans' (humanist sans). Code blocks always use a monospace font."
    • addedInput schema / properties / options / properties / fontSize / description
      Added value: +"Body text size in points. Headings, spacing and line height scale from it. Default 10."
    • changedInput schema / properties / options / properties / keywords / description
      Previous value: -"PDF /Keywords metadata."New value: +"Search keywords, written to the PDF metadata."
    • addedInput schema / properties / options / properties / pageSize / description
      Added value: +"Paper size. Default 'A4'."
    • addedInput schema / properties / options / properties / splitMode / description
      Added value: +"How sections break across pages. 'default' keeps each section together where it can; 'balanced' splits large sections to fill pages and leave fewer gaps."
    • changedInput schema / properties / options / properties / subject / description
      Previous value: -"PDF /Subject metadata."New value: +"One-line summary of the document, written to the PDF metadata."
    • addedInput schema / properties / options / properties / theme / description
      Added value: +"Visual style. 'github' (the default): lighter semibold headings, underlined h1/h2, zebra-striped bordered tables. 'default': heavier bold headings with no underlines or striping."
    • changedInput schema / properties / options / properties / title / description
      Previous value: -"Optional document title (shown in PDF metadata)."New value: +"Document title written to the PDF metadata. PDF viewers show it in the window title instead of the file name."
  5. Changed2 schema fields changed
    • addedInput schema / properties / options / properties / pageNumberPosition
      Added value: +{
      +  "description": "Footer alignment when pageNumbers is set. Default 'right'. Ignored without pageNumbers.",
      +  "enum": [
      +    "left",
      +    "center",
      +    "right"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / pageNumbers
      Added value: +{
      +  "description": "Footer page-number format: 'page-n-of-total' (Page 3 of 12), 'n-of-total' (3 / 12), or 'n' (3). Omit for no page numbers.",
      +  "enum": [
      +    "page-n-of-total",
      +    "n-of-total",
      +    "n"
      +  ],
      +  "type": "string"
      +}
  6. Changed2 schema fields changed
    • changedInput schema / properties / markdown / description
      Previous value: -"GitHub-flavored markdown source."New value: +"GitHub-flavored markdown source. Max 200KB of text; inline data: image payloads are excluded from that budget."
    • removedInput schema / properties / markdown / maxLength
      Removed value: -200000
  7. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the cost model (1 credit per 10 pages, makesPDF credits), a plan-dependent branding footer on Free/Hobbyist accounts, the output shape (JSON metadata plus base64 PDF resource plus resource_link), the 200KB input cap with the image-payload exception, and PDF/A-2A + PDF/UA-1 accessibility. It also names the underlying endpoint, so the agent knows this is a billable external write with side effects not implied by destructiveHint=false.

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?

Front-loaded with the action and the trigger, then capability list, then cost/return/limits — a sensible information hierarchy with no filler sentences. The density is high but every clause (credits, watermark, accessibility, 200KB cap, endpoint mirror) carries decision-relevant information.

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?

The tool is complex (a nested 12-property options object, billable rendering, multi-part output), yet the description covers cost, plan-dependent watermarking, input limits, output format, and standards compliance. Even though an output schema exists, the summary of returned metadata fields helps the agent plan follow-up calls without schema inspection.

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 coverage is 100%, so every option (theme, margins, pageSize, splitMode, pageNumbers, frontmatter fallbacks) is already documented in the schema and the description only repeats the frontmatter-override idea. What it does add is content-side meaning for `markdown`: GFM support, tables, task lists, Mermaid diagrams, code highlighting, images, and the size limit.

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?

"Create a PDF document from markdown text" gives a specific verb and resource, then enumerates the concrete content types it covers (notes, reports, letters, diagrams), which separates it from a validator or DSL preview. It never names a sibling tool, so the differentiation is inferred from the resource (markdown vs DSL/template) rather than stated.

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?

"Use when the user asks for a PDF of written content" is an explicit trigger condition with illustrative examples, which is more than most definitions give. There is no when-not guidance and no named alternative (e.g., validate_markdown for checking syntax, render_dsl_preview for DSL input), so an agent must infer routing.

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