Skip to main content
Glama
Nizoka

pdfnative-mcp

Add barcode / QR code

add_barcode
Idempotent

Create a PDF page embedding a barcode or QR code from text or URLs. Supports QR, Code 128, EAN-13, Data Matrix, and PDF417.

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
formatYesBarcode symbology to render.
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.
captionNoOptional caption rendered above the barcode.
titleNoPDF document title (also rendered as page heading).Barcode
widthNoBarcode width in PDF points.
heightNoBarcode height in PDF points (ignored for square symbologies like QR/Data Matrix).
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
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.
outputModeNobase64
outputPathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
sizeBytesYes
filePathNoAbsolute sandboxed file path (when mode='file').
base64NoBase64-encoded PDF bytes (when mode='base64').
Behavior4/5

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

Annotations already indicate idempotency and non-destructiveness. The description adds important behavioral details: no URL-encoding of data, auto-computation of EAN-13 check digit, and error correction level recommendations for printed media. It does not describe 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening sentence, a bullet list of formats with use cases, and a concrete recipe example. It is not overly verbose, though slightly more conciseness could be achieved.

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 (10 parameters, 4 enums, output schema exists), the description covers key aspects: formats, data constraints, error correction, and an example. It does not explain outputMode/outputPath, but the output schema likely covers return values.

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?

The description adds significant meaning beyond the input schema by providing usage context for each format, concrete data format examples, and guidance on error correction levels. For instance, it clarifies that data should be raw payload and not URL-encoded.

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 that the tool generates a single-page PDF embedding a barcode or QR code. It lists specific barcode formats with examples, distinguishing it from sibling PDF tools like add_attachment or add_form.

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 provides guidance on when to use each barcode format (e.g., QR for URLs, code128 for SKUs, ean13 for retail) and includes a recipe for a common use case. However, it does not explicitly mention when to avoid this tool in favor of alternatives.

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