Generate PDF documents from HTML or Markdown. Custom page size, margins, headers. Ideal for reports and invoices.
Single tool 'document_generate_pdf' has a well-structured schema with proper types and enums. Description is comprehensive (380+ chars) and includes clear use-case guidance with explicit 'Do NOT use for' warnings. Input schema is complete with required fields, nested object support (margins), and enum constraints (format, pageSize). However, output schema is not formally documented in the tool definition, only described in prose. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) present. Error handling and recovery guidance are absent from the definition.
Use this when you need to create a PDF document from HTML or Markdown content. Returns binary PDF with custom formatting. Returns: 1. Binary PDF file 2. Configurable page size (A4, Letter, Legal) 3. Custom margins (top/right/bottom/left) 4. Landscape or portrait orientation 5. HTML and Markdown input support. Example output: binary PDF with Content-Type application/pdf, rendered from "<h1>Invoice #42</h1><p>Total: $1,200</p>" into a formatted A4 document. Use this FOR generating reports, invoices, proposals, contracts, or any formatted document from structured data. Essential when you have data/content and need a downloadable PDF. Do NOT use for capturing a live web page as PDF -- use webpage_to_pdf instead. Do NOT use for screenshots -- use capture_screenshot instead. Do NOT use for rendering markdown with CSS themes -- use text_render_markdown instead.
Output schema not formally documented. Description mentions 'Returns: 1. Binary PDF file 2. Configurable page size...' but no structured JSON Schema for the response is visible in tool definition.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) declared. The tool creates a PDF (side effect) but does not signal this via annotations.
Error handling and recovery guidance absent. No documented error cases, validation rules, or actionable error messages for invalid content, unsupported formats, or rendering failures.
Margins parameter lacks format validation details. Description says 'e.g. 20mm' but does not specify allowed units (mm, cm, in, px) or range constraints (min/max values).
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 67 | 2025-06-18+ | v2 |
No pagination or result-limiting guidance. If content is very large, no indication of max size, timeout behavior, or how to handle oversized documents.