Skip to main content
Glama

convert_markdown_to_pdf

Convert Markdown files to PDF documents with customizable themes, optional table of contents, watermark, and QR code support.

Instructions

Enhanced Markdown to PDF conversion with beautiful styling and theme support. Watermark can be added by setting addWatermark=true (uses WATERMARK_IMAGE environment variable or default text "doc-ops-mcp"). QR code can be added by setting addQrCode=true (requires QR_CODE_IMAGE environment variable). Requires playwright-mcp for final PDF generation. Output directory is controlled by OUTPUT_DIR environment variable. Files will be automatically saved to OUTPUT_DIR with auto-generated names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownPathYesMarkdown file path to convert
themeNoTheme to applygithub
includeTableOfContentsNoGenerate table of contents
addWatermarkNoAdd watermark to PDF (uses WATERMARK_IMAGE environment variable or default text "doc-ops-mcp")
addQrCodeNoAdd QR code to PDF (requires QR_CODE_IMAGE environment variable)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: automatic file saving to OUTPUT_DIR with auto-generated names, dependencies on environment variables (WATERMARK_IMAGE, QR_CODE_IMAGE, OUTPUT_DIR), and the requirement for playwright-mcp. However, it doesn't mention error handling, performance characteristics, or whether the operation is idempotent.

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 appropriately sized and front-loaded, starting with the core purpose. However, it could be more structured—environment variable details are scattered throughout, and the sentence about output directory placement feels tacked on. Most sentences earn their place, but minor reorganization would improve clarity.

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 conversion tool with no annotations and no output schema, the description does well to cover key behaviors like file handling and dependencies. It explains what happens to the output (saved automatically) and prerequisites (playwright-mcp). The main gap is lack of information about return values or error responses, which would be helpful given the absence of an output schema.

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 all parameters thoroughly. The description adds minimal value beyond the schema—it repeats watermark and QR code environment variable details but doesn't provide additional context about parameter interactions or usage examples. Baseline 3 is appropriate when the schema does most of the work.

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?

The description clearly states the tool's purpose: converting Markdown to PDF with enhanced styling and theme support. It specifies the exact transformation (Markdown→PDF) and distinguishes itself from siblings like convert_markdown_to_docx or convert_markdown_to_html by focusing on PDF output with specific features like watermarks and QR codes.

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?

The description provides clear context for when to use this tool: for PDF conversion with styling options. It mentions alternatives implicitly by noting requirements like playwright-mcp and environment variables, but doesn't explicitly compare to siblings like convert_docx_to_pdf or convert_markdown_to_docx, which would have strengthened the guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tele-AI/doc-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server