Skip to main content
Glama
shuji-bonji

pdf-writer-mcp

by shuji-bonji

Create Table PDF

create_table_pdf
Idempotent

Turn headers and row data into a ruled PDF table: column widths adjust to content, cells wrap, and the header repeats after page breaks.

Instructions

Create a ruled table PDF from headers and row data. Column widths are computed from the content, cells wrap, and the header row is redrawn after page breaks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoNatural language of the document (BCP 47, e.g. "ja" / "en-US"). When omitted with tagged, it is inferred from the text and the guess is reported in warnings. A wrong language declaration makes screen readers misread — state it explicitly when you know it.
rowsYesData rows. Each row is an array of strings; the same column count as headers is recommended.
titleNoPDF title. Set in the metadata and also drawn as a heading at the top of the body.
authorNoPDF author (metadata).
marginNoMargin on all sides (pt). Default 56 (about 20 mm). Range 0-300.
taggedNoGenerate as a tagged PDF (PDF/UA-1, ISO 14289). Default false. When true, a structure tree, the PDF/UA declaration, /Lang and DisplayDocTitle are added, making the document readable by screen readers. PDF/UA requires a title, so title becomes required.
headersYesHeader row (column titles).
fontPathNoAbsolute path of the font file to embed (.ttf / .otf). Required for non-Latin text such as Japanese. .ttc (TrueType Collection) is not supported. Can also be set via the PDF_WRITER_FONT environment variable.
fontSizeNoBody font size (pt). Default 11. Range 4-96.
pageSizeNoPage size. Default A4.
outputPathNoDestination file path (absolute). When omitted, a base64 string is returned instead.
pdfVersionNoPDF version to output. Default "1.7". "2.0" (ISO 32000-2) satisfies not just the version claim but the duties bound to it: a trailer /ID is added (Required per Table 15), and the Info dictionary is trimmed to CreationDate / ModDate with title, author and Producer moved to XMP (§14.3.3). Cannot be combined with tagged: true (the only declaration the writer can produce is PDF/UA-1, built on PDF 1.7).
returnBase64NoWhen true, include a base64 string in the result in addition to saving.
onMissingGlyphNoWhat to do with characters the font lacks (e.g. ✔ U+2714, missing from Noto Sans JP). error (default) = fail, listing the missing characters / replace = substitute 〓 with a warning / ignore = render as blanks with a warning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already provide idempotentHint=true and non-destructive/read-only flags. The description adds useful behaviors beyond annotations: automatic column widths, cell wrapping, and header redrawing after page breaks. It does not mention file side effects, but outputPath and returnBase64 in the schema cover that.

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?

Two sentences with no filler. The core purpose is front-loaded, and each clause adds meaningful behavior. It is compact while still informative.

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 14-parameter tool, the schema is exhaustive and the description adds table-specific rendering semantics. There is no output schema, but outputPath and returnBase64 explain result delivery well enough. The definition is complete for practical invocation.

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 baseline applies; the prose mostly repeats the notion of headers and row data. The schema itself thoroughly documents all parameters, defaults, enums, and requirements, so the description adds little parameter-level value.

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?

Description states a specific verb and resource: create a ruled table PDF from headers and row data. This clearly distinguishes it from the sibling text/markdown PDF tools and gives an unambiguous account of what the tool produces.

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 clearly implies use for tabular data via headers and rows, and sibling names like create_text_pdf and create_markdown_pdf make the contrast obvious. However, it never explicitly names alternatives or states when not to use it, so it stops short of full routing guidance.

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