Skip to main content
Glama
Nizoka

pdfnative-mcp

Add barcode / QR code

add_barcode
Idempotent

Add a barcode or QR code to a single-page PDF. Supports QR, Code128, EAN13, Data Matrix, and PDF417 formats with customizable error correction and size.

Instructions

Generate a single-page PDF embedding a barcode or QR code. Supported formats: • qr — URLs, vCards, any UTF-8 text ≤ 4296 chars. Use ecLevel='H' for printed media (logos/dirt-tolerant); 'M' (default) for screens. • code128 — alphanumeric SKUs, ASCII payloads. • ean13 — retail product codes (must be 12 or 13 digits; 13th is auto-computed). • datamatrix— dense industrial / aerospace markings. • pdf417 — ID cards, boarding passes. Common recipe for a QR code pointing to a URL: { format: 'qr', data: 'https://example.com', caption: 'Scan me' }. The data field is the raw payload — do NOT pre-encode URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesRaw payload to encode — do NOT URL-encode. For QR/URL pass e.g. "https://example.com" verbatim. EAN-13 must be 12 or 13 digits (13th is auto-computed). Code 128 accepts ASCII alphanumerics.
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.
titleNoPDF document title (also rendered as page heading).Barcode
widthNoBarcode width in PDF points.
formatYesBarcode symbology to render.
heightNoBarcode height in PDF points (ignored for square symbologies like QR/Data Matrix).
captionNoOptional caption rendered above the barcode.
ecLevelNoQR ONLY. Error correction level (L=7%, M=15%, Q=25%, H=30%). Ignored for code128/ean13/datamatrix/pdf417. Use H for printed media that may get smudged or partially covered (e.g. logo overlay).M
outputModeNobase64
outputPathNo

Output Schema

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

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

Discloses behavioral traits beyond annotations: generates a PDF, explains format-specific behavior (ecLevel ignored for non-QR, width/height constraints), output modes, and PDF/A conformance. Annotations already indicate idempotentHint=true, and description adds valuable context without contradiction.

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 and well-structured: bullet points for formats, a common recipe, and additional notes. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 params, enums, output schema), the description covers all key aspects: formats, parameters, output modes, and archival options. It is complete for an agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, and description adds meaning beyond schema: explains that 'data' should not be URL-encoded, ecLevel usage, and which parameters are ignored for certain formats. This enhances understanding beyond the schema's bare descriptions.

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 embedding a barcode or QR code, listing supported formats and a common recipe. It distinguishes from sibling tools like add_attachment or add_form, which handle other PDF elements, making the purpose precise and distinct.

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?

Provides specific usage guidance: common recipe for QR URLs, format-specific constraints (EAN-13 digits, ecLevel recommendations), and a note not to pre-encode URLs. While it doesn't explicitly state when not to use, the context is clear for barcode generation.

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