Skip to main content
Glama

Organize PDF pages

pdf_organize
Read-onlyIdempotent

Reorder, delete, duplicate, or insert blank pages in a PDF from a page list, then optionally rotate selected pages of the rebuilt document.

Instructions

Rebuild a PDF from a page list: reorder, delete (leave pages out), duplicate (list a page twice) and insert blank pages. "3, 1-2, blank, 5-" puts page 3 first, then 1-2, a blank page (same size as the page before it), then 5 to the end; page 4 is dropped. Optionally rotate pages of the result. Existing page rotation is kept. Web version: https://s3eidat.github.io/pdf-organizer/

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI).
pagesYesNew page order (1-based source pages): e.g. "3, 1-2, blank, 2, 5-". Pages not listed are removed; "blank" adds an empty page.
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
rotateNoOptional rotations applied to pages of the new order.
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint, so the safety profile is covered. The description adds genuinely useful behavioral detail beyond that: unlisted pages are dropped, blank pages match the size of the preceding page, and existing page rotation is preserved. It does not say whether the source file is untouched or how an existing output path is handled, which keeps it at 4.

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?

Purpose is front-loaded in the first clause, followed by a concrete example that earns its space. The trailing link to the web version is the only sentence that adds nothing for an agent, a small but real dilution.

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?

For a five-parameter file-producing tool with no output schema, the description covers the input grammar, page-drop semantics and rotation handling well. It leaves the return shape implicit (what the result object contains besides optional base64) and does not state that the source PDF is left unmodified, a gap that annotations only partly cover.

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 coverage is 100%, so all five parameters are already documented. The description's page-list syntax is essentially a restatement of the 'pages' schema description, and it says nothing about 'output' path semantics or 'returnBase64' trade-offs beyond what the schema states. 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?

States a specific verb and resource ('Rebuild a PDF from a page list') plus the four operations it enables (reorder, delete, duplicate, insert blanks), which cleanly separates it from siblings like pdf_extract_pages, pdf_split, pdf_merge and pdf_rotate. The worked example makes the tool's scope unambiguous.

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?

The worked page spec plus 'Pages not listed are removed' makes the intended use case and semantics clear, and rotation is framed as an optional post-step. It never names a sibling or an explicit when-not-to-use condition (e.g. use pdf_rotate if you only need rotation, or pdf_extract_pages if you only need a subset), so it stops short of a 5.

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

Deploy Server

Other Tools