Skip to main content
Glama

Reorder the pages of a PDF

pdf_reorder

Reorder PDF pages by specifying the new sequence, then write a new PDF with every page included exactly once. Use it to fix page order without losing content.

Instructions

Call this tool to write a new PDF with pages in the order you give. The order must name every page exactly once, so nothing drops by accident; use pdf_pages for a subset. Pro.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe source PDF
orderYesThe 1-based page numbers in their new order, e.g. [3,1,2] for a three-page file. Every page must appear exactly once
out_pathYesWhere to write the reordered PDF
overwriteNoReplace out_path if it exists. Default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the safety profile is covered. The description adds the validation rule ('name every page exactly once, so nothing drops by accident') and a cryptic 'Pro.' marker suggesting a plan requirement, but says nothing about overwrite semantics or that the source file is untouched.

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?

Two tight sentences with the action front-loaded and the key constraint immediately after. The trailing 'Pro.' is terse to the point of being unclear, and 'Call this tool to' is minor filler.

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 4-parameter write tool with no output schema, the description covers purpose, the critical validation constraint, and the sibling to use instead. Only the overwrite/file-clobbering behavior and any permission requirements are left implicit, and those are partly handled by the schema.

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% and every parameter (path, order, out_path, overwrite) is documented in the schema itself. The description's mention of the order constraint duplicates the schema text and adds no new syntax or format detail, so the baseline 3 applies.

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 ('write a new PDF with pages in the order you give'), which is clearly distinct from pdf_pages/pdf_split. It does not differentiate itself from the other PDF writers (pdf_merge, pdf_rotate), but the core action is 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?

Names the alternative explicitly: 'use pdf_pages for a subset', giving a clear when-not condition. No exclusion guidance relative to pdf_merge or pdf_rotate, so it stops short of a full routing statement.

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