Skip to main content
Glama

Markdown to PDF

ai_markdown_to_pdf
Read-onlyIdempotent

Convert GitHub-flavoured Markdown into paginated A4, Letter, or A5 PDFs with headings, lists, tables, code blocks, page numbers, and clickable links.

Instructions

Turn Markdown (GitHub-flavoured) into a clean, paginated A4/Letter/A5 PDF: headings, paragraphs with word wrap, bold/italic/strikethrough, inline code, links (clickable), bullet / numbered / task lists (nested), tables (wrapped cells, header repeated on new pages), blockquotes, code blocks, horizontal rules, local images (relative to the Markdown file; remote images are never fetched and show as alt text), page breaks (\pagebreak, \newpage or ), page numbers, margins and title metadata. Text uses the built-in PDF fonts: Latin text only (English and Western European). Arabic, CJK and other scripts are not supported yet: such characters are replaced with "?" (or rejected with onUnsupportedChar: "error"); emoji are dropped; arrows and common symbols are transliterated. Give "markdown" inline or "path" to a .md file.

Input Schema

NameRequiredDescriptionDefault
fontNoBody font: sans (Helvetica) or serif (Times). Code is always Courier.sans
pathNoA .md file: local path or base64. Relative image links resolve against its folder.
paperNoA4
titleNoPDF title metadata. Default: the first # / ## heading.
authorNo
marginNoPage margin in mm. Default 20.
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
fontSizeNoBody font size in pt. Default 10.5.
markdownNoMarkdown text. Use this or "path".
landscapeNo
pageNumbersNoPrint "n / total" at the bottom of each page. Default true.
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.
onUnsupportedCharNoWhat to do with characters the PDF fonts can't show: replace with "?" (default) or fail.replace

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior1/5

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

The annotations declare readOnlyHint=true, but the description says the tool writes a result: the "output" parameter accepts "a file path, or a folder ending in '/'", with a default server output folder. Writing a PDF file modifies the environment, directly contradicting readOnlyHint=true. The rich feature and limitation disclosure otherwise adds useful context, but the annotation contradiction is serious.

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 description is dense and largely a single long feature list, but it is front-loaded with purpose and every clause describes relevant supported behavior or a limitation. For a 13-parameter conversion tool with no output schema, the length is defensible, though the run-on structure reduces readability.

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?

The description thoroughly covers input Markdown features and limitations, but with no output schema it does not clearly state what the tool returns by default beyond the optional base64 behavior. It also leaves the write-to-file behavior in tension with the readOnlyHint annotation, so an agent lacks a fully coherent behavioral picture.

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 high at 77%, so the schema already documents most parameters. The description adds marginal clarity by saying "Give 'markdown' inline or 'path' to a .md file" and by explaining unsupported-character behavior, but it largely repeats parameter meaning already present in 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 specific verb and resource: "Turn Markdown (GitHub-flavoured) into a clean, paginated A4/Letter/A5 PDF." It clearly identifies the output format and supported Markdown features, but it does not explicitly differentiate from sibling tools such as ai_markdown_to_docx or other PDF utilities.

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 gives implied usage by stating "Give 'markdown' inline or 'path' to a .md file" and lists important content limitations such as Latin-only text and remote images never being fetched. However, it does not say when to use this tool versus alternatives like ai_markdown_to_docx or other PDF tools, and it provides no explicit routing guidance.

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

Deploy Server

Other Tools