Skip to main content
Glama
NikhilBelwate

pdf-merger-mcp-server

Merge PDFs

pdf_merger_merge

Merge uploaded PDFs in a specified order into one PDF. Provide session ID and file order to get a download token and page count.

Instructions

Merge previously uploaded PDFs in a specified order into a single PDF.

Returns a one-time download token. Use pdf_merger_get_download_url to build the download link. The session is consumed after merging — re-upload files to merge again.

Args:

  • session_id (string): UUID of the upload session.

  • file_order (string[]): Ordered array of file UUIDs. The first entry becomes the first pages of the merged output. Must contain at least 2 file IDs and at most 30.

Returns (JSON): { "token": "uuid", "page_count": 45, "size_formatted": "2.3 MB", "download_url": "https://..." }

Workflow:

  1. Upload PDFs using pdf_merger_upload_pdfs

  2. (Optional) Remove unwanted files using pdf_merger_remove_file

  3. Merge using this tool with desired file order

  4. Use the returned download_url to download the merged PDF

Error Handling:

  • Session not found → 404

  • File order contains unknown IDs → 400

  • Encrypted/corrupt PDF → 422

  • Less than 2 files → 400

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_orderYesOrdered array of file IDs specifying the merge sequence. The first ID becomes the first pages of the output.
session_idYesSession ID containing uploaded PDFs.
Behavior5/5

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

Beyond annotations, the description discloses that the session is consumed after merging, that the returned token is one-time, and includes specific HTTP error codes for failure modes. This is substantial behavioral context not present in 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?

The description is well structured with focused sections: overview, return value, workflow, and error handling. Each section adds necessary information, and the most important purpose statement is 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?

Despite lacking an output schema, the description provides a concrete JSON return example, full workflow guidance, and error handling details. This gives the agent enough context to invoke the tool correctly and interpret results.

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?

Input schema coverage is 100%, and the schema already describes both parameters, including min/max items and the ordering behavior. The description repeats this information without adding new parameter-level meaning, so baseline 3 applies.

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 opens with a specific verb and resource: "Merge previously uploaded PDFs in a specified order into a single PDF." It clearly distinguishes this from sibling tools by naming the upload, remove, and download steps.

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

Usage Guidelines5/5

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

The Workflow section explicitly lists the sequence of operations (upload → remove optional → merge → download) and mentions the one-time session constraint, which tells the agent when to use this tool and when re-uploading is needed.

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/NikhilBelwate/pdf-merger-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server