Skip to main content
Glama
NikhilBelwate

pdf-merger-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP server port (only when TRANSPORT=http)4000
TRANSPORTNoTransport mode: stdio or httpstdio
PDF_MERGER_API_URLNoBase URL of the PDF Merger App APIhttp://localhost:3000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pdf_merger_upload_pdfsA

Upload one or more PDF files to the PDF Merger service for later merging.

Each file must be a valid PDF (≤100 MB). Up to 30 files can be uploaded per session. If session_id is provided, files are appended to that existing session; otherwise a new session is created.

Args:

  • file_paths (string[]): Absolute paths to PDF files on disk.

  • session_id (string, optional): UUID of existing session to append to.

Returns (JSON): { "session_id": "uuid", "files": [ { "id": "uuid", "name": "doc.pdf", "size": 102400, "sizeFormatted": "100.0 KB" } ] }

Examples:

  • Upload two files to a new session: file_paths=["/tmp/report.pdf", "/tmp/appendix.pdf"]

  • Append to existing session: file_paths=["/tmp/extra.pdf"], session_id="550e8400-..."

Error Handling:

  • File not found on disk → clear message with the missing path

  • Non-PDF file → 415 error from API

  • File >100 MB → 413 error from API

  • 30 files in session → 400 error from API

pdf_merger_remove_fileA

Remove a single PDF file from an upload session on the PDF Merger service.

The file is permanently deleted from cloud storage. This operation cannot be undone.

Args:

  • session_id (string): UUID of the session containing the file.

  • file_id (string): UUID of the file to remove.

Returns (JSON): { "success": true }

Error Handling:

  • Session not found → 404 error

  • File not found in session → 404 error

pdf_merger_mergeA

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

pdf_merger_get_download_urlA

Build a one-time download URL for a merged PDF.

The token is returned by pdf_merger_merge. Each token can only be used once; after the first download the link expires and all associated cloud files are cleaned up.

Args:

  • token (string): One-time download token UUID from the merge response.

Returns (JSON): { "download_url": "https://your-api.example.com/download/" }

Notes:

  • Opening the URL in a browser triggers a file download of "merged.pdf".

  • After download, source blobs are automatically deleted from cloud storage.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: upload, remove, merge, and get download URL. There is no overlap in functionality, and the descriptions reinforce the boundaries between them.

Naming Consistency5/5

All tool names follow a consistent prefix+verb_noun pattern (pdf_merger_remove_file, pdf_merger_upload_pdfs, pdf_merger_get_download_url). The single exception, pdf_merger_merge, is still a clear verb and fits the overall style.

Tool Count5/5

Four tools is a well-scoped size for a PDF merging service. Each tool covers a necessary step in the workflow without redundancy or bloat.

Completeness4/5

The core workflow (upload, remove, merge, download) is covered. However, there is no tool to list the current files in a session, which would be needed if an agent needs to reference file IDs without having just uploaded them. This is a minor but notable gap.

Maintenance

ActivityInactive
ResponsivenessNo issues