Skip to main content
Glama
Nizoka

pdfnative-mcp

Merge PDFs

merge_pdfs
Idempotent

Concatenate 2 to 50 PDFs into a single document. Signatures and AcroForms are automatically stripped; link annotations remain unless explicitly dropped.

Instructions

Concatenate 2–50 source PDFs into a single document (pdfnative v1.4 page-tree API). Each kept page's object graph is deep-copied into a fresh, self-contained PDF. Signatures and AcroForms are dropped (a page-tree edit invalidates /ByteRange); self-contained URI link annotations are preserved unless dropAnnotations=true. Encrypted sources are rejected (ENCRYPTED_SOURCE) — decrypt first. A secure-by-default 256 MiB in-memory assembly guard (maxOutputSizeBytes) guards against memory exhaustion; the emitted PDF is separately capped at 50 MiB (OUTPUT_TOO_LARGE). Returns one PDF (base64 or sandboxed file).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputModeNobase64
outputPathNo
pdfsBase64YesBase64-encoded source PDFs to concatenate, in order. 2–50 documents. Signatures and AcroForms are dropped (a page-tree edit invalidates them); encrypted PDFs are rejected.
dropAnnotationsNoWhen true, drop ALL annotations. Default (false) keeps self-contained URI link annotations and drops cross-document/widget annotations.
maxOutputSizeBytesNoIn-memory assembly guard (pdfnative maxOutputSize): the merge throws before materialising an object graph larger than this. Defaults to 268435456 (256 MiB). Note the emitted PDF is separately capped at 50 MiB by the output layer.

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?

Rich behavioral detail beyond annotations: deep-copies object graphs, drops signatures/AcroForms, handles annotations, rejects encrypted sources, limits memory and output size. No contradiction with annotations.

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?

Information-dense without fluff, but could be slightly trimmed. Still highly efficient and well-structured with key details front-loaded.

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?

Fully covers purpose, parameters, constraints, and return type given the tool's complexity and presence of output schema. No gaps.

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?

Adds meaning beyond schema by explaining output mode behavior, memory guard effect, and annotation preservation rules. Compensates for schema descriptions that are already present but enriches context.

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 clearly states it 'Concatenate 2–50 source PDFs into a single document' with specific verb and resource, and distinguishes from sibling tools like split_pdf and extract_pages.

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 clear context for use: concatenating PDFs, with constraints on count, encryption, and annotation handling. Does not explicitly state when not to use or compare to alternatives, but the details guide appropriate usage.

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