Skip to main content
Glama
shuji-bonji

pdf-writer-mcp

by shuji-bonji

Merge PDFs

merge_pdfs
Idempotent

Merge multiple PDFs into a single file in specified order, carrying over metadata from the first. Save to a path or get base64 output; warnings detail any lost elements.

Instructions

Merge multiple PDFs into one, in the given order. Document metadata is carried over from the first file. Pages are copied into a new document, so document-level information (tagged structure, XMP, attachments, AcroForm, bookmarks, etc.) is not carried over. Anything lost is reported in warnings; follow up on the output with attach_file / ensure_tagged / add_bookmarks / set_metadata as needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputPathsYesAbsolute paths of the PDFs to merge (in merge order, 2 or more).
outputPathNoDestination file path (absolute). When omitted, a base64 string is returned instead.
returnBase64NoWhen true, include a base64 string in the result in addition to saving.
allowBreakingSignaturesNoWhen the target is digitally signed (detected via /ByteRange), the default is an error. Set true to proceed, accepting that the signatures become invalid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.2

TDQS

A4.3/5.0
Behavior5/5

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

The description goes well beyond the annotations by detailing what is retained (metadata from the first file), what is lost (tagged structure, XMP, attachments, AcroForm, bookmarks), and how to detect or remediate losses via warnings and follow-up tools. This is rich, accurate behavioral disclosure and matches the annotations.

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?

Every sentence contributes: the first states the action, the second discloses metadata and document-level loss, and the third provides actionable remediation. The structure front-loads the core behavior and uses the remaining space for high-value caveats. It is dense but not bloated.

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 schema fully documents all four parameters and annotations cover idempotence and read/write intent, the description completes the picture with merge order, metadata carry-over, page copying semantics, and loss remediation. Nothing essential to invoking the tool correctly or interpreting its behavior is missing.

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?

The input schema already documents all parameters with 100% coverage, including inputPaths ordering, outputPath behavior, returnBase64, and allowBreakingSignatures. The description adds little parameter-specific meaning beyond reinforcing that merge order matters, which is already in the schema. Baseline 3 is appropriate.

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 uses a specific verb (merge) with a clear resource (multiple PDFs) and scope (in the given order). It is immediately distinguishable from sibling tools like split_pdf, extract_pages, and create_text_pdf. The core action and result are unambiguous.

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

Usage Guidelines3/5

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

The description clearly implies that the tool is for combining multiple PDFs into one, and it suggests follow-up tools for restoring lost document-level features. However, it does not explicitly state when to use this tool versus alternatives or mention exclusions. The usage context is understandable but left largely to inference.

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