A MCP server for generating PDFs using PDFKit and Puppeteer
This MCP server provides two PDF generation tools with basic descriptions and schemas, but falls significantly short of production quality standards. Both tools have adequate but generic descriptions (around 100-130 characters each), and input schemas are present with typed parameters. However, critical gaps exist: output schemas are not documented, descriptions lack specificity about when to use each tool vs the other, parameter descriptions are minimal, error handling provides no recovery guidance, and there is no discussion of resource constraints (file size limits, timeouts). The server implements custom tool registration via MCPServer.registerFunction() rather than following current MCP patterns. No pagination, no resource cleanup guidance, and no security considerations around generated PDF storage or Puppeteer resource management are evident.
Generates a PDF document with the provided content, title, and author metadata using PDFKit
Generates a PDF document from HTML content using Puppeteer with configurable options
No output schema documentation. Tools return {data, contentType} but this structure is not formally documented. LLMs cannot reliably predict what fields are present or how to use the base64-encoded PDF data.
Descriptions lack differentiation between the two tools. Both say they generate PDFs; a user/agent cannot easily determine when to use generatePDF (text content) vs generatePDFFromHTML (HTML rendering). The descriptions should explain use cases: 'Generates a simple PDF from plain text content using PDFKit (fast, minimal dependencies)' vs 'Renders HTML/CSS to PDF using Puppeteer (supports complex layouts, styling, and web content)'.
Parameter descriptions are present but minimal and generic. 'The text content to include in the PDF' and 'Optional Puppeteer PDF generation options (format, margin, printBackground, etc.)' do not explain constraints, expected formats, or valid ranges. For example, 'options' in generatePDFFromHTML lacks specification of what object keys are supported, max file size, or timeout behavior.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 40 | - | v1 |
No error handling or recovery guidance. Both tools wrap errors in try-catch but provide no actionable error messages to the agent. If Puppeteer crashes, if PDF generation times out, or if an oversized HTML is submitted, the agent receives a generic error with no guidance on what went wrong or what to try next.
No resource constraints or limits documented. generatePDFFromHTML launches a Puppeteer browser process per call with no documented timeout, memory limit, or concurrency control. This creates risk of resource exhaustion if an agent calls the tool repeatedly. No limit on content size is enforced or mentioned.
No acknowledgment of side effects or file storage. Both tools generate PDFs and return base64 data, but there is no documentation of where PDFs are stored, how long they persist, cleanup policy, or whether the agent can download the generated file for user access.
Parameter 'options' in generatePDFFromHTML is an untyped object with no schema constraint. LLMs cannot determine valid keys, types, or constraints. This violates the constrained-input pattern and invites hallucinated or invalid Puppeteer options.
No metadata or structured output for downstream tool chaining. If a user wants to store the generated PDF, email it, or process it further, there is no document ID, storage path, or reference returned, only opaque base64 data.