Skip to main content
Glama
Nizoka

pdfnative-mcp

Add native vector chart

add_chart
Idempotent

Generate a single-page PDF with a native vector chart: bar, horizontal bar, line with markers, pie, or donut. Supports multi-series, legends, gridlines, negative values, and tagged PDF with auto alt text.

Instructions

Generate a single-page PDF with a native vector chart (pdfnative v1.6.0): bar, barH (horizontal bar), line (optional markers), pie or donut — rendered as pure PDF path operators, zero rasterisation. Multi-series bar/line, legends, 'nice' 1/2/5×10ⁿ axis ticks, gridlines, negative values, and a tagged-PDF /Figure + /Alt (auto-generated when altText omitted, so PDF/A stays conformant). Pie/donut use exactly one series (each value = a slice). Colours are hex strings (e.g. '#3366cc'). For a chart embedded amongst headings/paragraphs/tables, use a 'chart' block inside generate_basic_pdf instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axisNoValue-axis options (bar/line only).
pdfANoOptional PDF/A conformance level (powered by pdfnative v1.2). Use 'pdfa1b' for archival of simple text+images, 'pdfa2b'/'pdfa2u' for richer content (2u guarantees Unicode mapping), 'pdfa3b' when embedding source attachments (Factur-X / ZUGFeRD). Mutually exclusive with PDF encryption. See docs/guides/PDFA.md.
alignNoHorizontal alignment within the content width. Default 'left'.
introNoOptional introductory paragraph rendered above the chart. The chart `title` (if any) is also used as the PDF metadata title.
titleNoChart title rendered above the plot.
widthNoPlot width in points (clamped to content width). Default 460.
colorsNoPalette override (per-series for bar/line, per-slice for pie/donut).
heightNoPlot-area height in points. Default 240.
legendNoLegend placement. Defaults to 'bottom' for multi-series/pie, else 'none'.
seriesYesData series. Pie/donut charts use exactly one series (each value becomes a slice).
altTextNoAlt text for the tagged-PDF /Figure /Alt. Auto-generated when omitted.
markersNoDraw point markers on line series. Default false.
chartTypeYesChart kind. 'pie'/'donut' use exactly one series; 'bar'/'barH'/'line' support multiple series.
categoriesNoCategory / slice labels (x-axis). Defaults to 1-based indices when omitted.
outputModeNoEither 'base64' (returns the PDF inline) or 'file' (writes into the PDFNATIVE_MCP_OUTPUT_DIR sandbox).base64
outputPathNoRequired when outputMode='file'. Relative path inside the sandbox; must end with .pdf.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
filePathNoAbsolute sandboxed file path (when mode='file').
sizeBytesYes
Behavior4/5

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

The description reveals behavioral traits like zero rasterization, auto-generated alt text for PDF/A, and constraints on series count for pie/donut. Annotations already indicate idempotent hint, and description adds value beyond that, though it could mention more about output format or error handling.

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?

The description is concise, front-loaded with the main purpose, then lists features and constraints, and ends with a clear alternative. Every sentence provides value without redundancy.

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?

Given the complexity (16 params, nested objects, output schema), the description covers the main behavioral aspects and usage boundaries. It lacks details on error handling or limitations like max series count, but those are in the schema. The presence of an output schema reduces the need to explain return values.

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 coverage is 100%, so the baseline is 3. The description provides some high-level context (e.g., pie uses one series, colors are hex strings) but does not add significant detail beyond what the schema already provides for individual parameters.

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 generates a single-page PDF with native vector charts, listing specific chart types (bar, barH, line, pie, donut) and rendering method. It distinguishes from sibling tool generate_basic_pdf by noting that for embedded charts, one should use that tool instead.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool (standalone chart PDF) and when not to (embedded charts: use generate_basic_pdf). It also lists supported chart types and key features, giving clear context for selection.

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/Nizoka/pdfnative-mcp'

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