Skip to main content
Glama
Paperboy

Paperboy

Official
by sudostash

merge_pdfs

DestructiveIdempotent

Combine multiple PDF files in a specified order into one output document, with optional password handling for encrypted or protected inputs.

Instructions

Merge PDFs in the given order into output_path.

passwords optionally maps an input path to its password for encrypted inputs. An input that forbids document assembly needs its owner password.

Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_paths": "<input_paths>",
      "output_path": "<output_path>"
    },
    "name": "merge_pdfs"
  }
}

Input Schema

NameRequiredDescriptionDefault
overwriteNo
passwordsNo
input_pathsYes
output_pathYes

Output Schema

NameRequiredDescriptionDefault
pagesYes
outputYes
sourcesYes
password_protectedYes
user_password_changedYes
permissions_restrictedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "output": {
      +      "title": "Output",
      +      "type": "string"
      +    },
      +    "pages": {
      +      "title": "Pages",
      +      "type": "integer"
      +    },
      +    "password_protected": {
      +      "title": "Password Protected",
      +      "type": "boolean"
      +    },
      +    "permissions_restricted": {
      +      "title": "Permissions Restricted",
      +      "type": "boolean"
      +    },
      +    "sources": {
      +      "title": "Sources",
      +      "type": "integer"
      +    },
      +    "user_password_changed": {
      +      "title": "User Password Changed",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "password_protected",
      +    "permissions_restricted",
      +    "user_password_changed",
      +    "output",
      +    "pages",
      +    "sources"
      +  ],
      +  "title": "MergeResult",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is known; the description adds non-obvious behavior around encrypted inputs, owner passwords for assembly-restricted documents, and the "ask" flow that keeps secrets out of the chat. The notable gap is that the overwrite parameter and what happens when output_path already exists are never described, which matters for a destructive write.

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?

Front-loaded with the core action in the first sentence, followed by short scoped paragraphs on passwords. Each sentence earns its place, though the chat-security rationale in the final clause is slightly more explanation than an agent strictly needs.

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?

An output schema exists, so return values need not be described, and the trickiest parameter (passwords) is fully covered. The definition falls just short of complete because overwrite behavior is undocumented and there is no note on failure modes for missing or invalid input paths.

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 description coverage is 0%, so the description must carry all four parameters. It explains passwords thoroughly (path-to-password mapping, owner-password requirement, and the "ask" sentinel) and names input_paths ordering and output_path, but leaves the overwrite boolean with default null completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Merge PDFs") plus a deterministic ordering rule ("in the given order") and the target ("into output_path"). An agent can immediately distinguish it from non-merging siblings like compare_pdfs or extract_pages, though no sibling is named explicitly.

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?

Usage is implied by the merge-and-write semantics, and the password paragraphs clarify prerequisites for encrypted inputs. However, there is no explicit guidance on when to pick this over similar assembly tools such as interleave_pdfs, n_up, or images_to_pdf, nor any note on preconditions when output_path already exists.

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