Skip to main content
Glama

Reorder the pages of a PDF

pdf_reorder

Reorder a PDF's pages by listing the desired page order and writing the updated file to a new path. Every page must be specified exactly once so no content is lost.

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.8/5.0
Behavior3/5

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

The description reveals that a new PDF is written and warns that every page must appear exactly once to avoid drops. But with no annotations, it does not disclose failure behavior, whether the original file is left untouched, or whether out_path can overwrite an existing file. The core behavior is clear, but the mutation safety profile is incomplete.

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?

The description is short and front-loaded with the key purpose and constraint. The trailing 'Pro.' appears to be a truncated or meaningless fragment, which slightly hurts polish, but the overall structure is efficient and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple reorder operation, the description gives the essential information: write a new PDF, preserve all pages exactly once, and use pdf_pages for subsets. However, with no output schema or annotations, it leaves gaps around return values, error cases, and out_path behavior. It is adequate but not fully complete.

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 fair: path and order have useful descriptions, and order is well explained. The description adds the idea of 'write a new PDF' but does not clarify out_path semantics beyond what the schema's type implies. It does not explain overwrite behavior or whether out_path may equal path.

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 uses a specific verb and resource: 'write a new PDF with pages in the order you give.' It clearly identifies the function and distinguishes it from pdf_pages, which handles subsets. The purpose is unambiguous and easy to act on.

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?

It explicitly states when to call the tool and directs the agent to pdf_pages for subset operations. It also clarifies the exact ordering constraint. However, it does not mention other alternatives like pdf_merge or pdf_split, though those are less directly related.

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