Skip to main content
Glama

Reorder PDF pages

reorder_pdf_pages

Reorder pages in a PDF by listing the new sequence; omitted pages are dropped, and a trailing hyphen keeps the remaining pages. Saves a new file without changing the original.

Instructions

Save a new PDF with the pages in a new order. List every page in the order wanted; pages left out are dropped, so end with e.g. "4-" to keep the rest. Use this to move pages; to only remove pages use delete_pdf_pages. Returns the saved path and page count; the input is not changed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>",
      "order": "<order>"
    },
    "name": "reorder_pdf_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to the file (absolute, or relative to the working directory).
orderYesThe new page order, e.g. "3, 1-2, 4-", like "1-3, 8" (a trailing "-" means to the end).
outputNoWhere to save the result. Defaults to a new file next to the input.
passwordNoThe PDF's current password, if it has one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: it saves a new PDF, leaves the input unchanged, drops pages omitted from the order, and returns the saved path and page count. These details are essential for safe invocation and go well beyond the structured safety hints.

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 four short sentences, front-loaded with the core action and followed by the critical ordering caveat, alternative routing, and return behavior. Every sentence carries useful information with no repetition.

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?

For a non-read-only PDF transformation with no output schema, the description covers the essential facts: a new file is saved, the input is unchanged, omitted pages are dropped, the output path and page count are returned, and a related sibling is identified. Nothing critical for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is already 100%, so the baseline is 3. The description still adds meaningful semantics for the order parameter, especially that omitted pages are dropped and that a trailing dash preserves the remaining pages, which is more than the schema alone conveys.

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 states a specific verb and resource: save a new PDF with pages in a new order. It explicitly distinguishes the operation from deleting pages and names the sibling tool to use for that case, so an agent can identify the tool without opening the schema.

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?

It gives an explicit when-to-use statement: 'Use this to move pages.' It also names the alternative for a closely related task, 'to only remove pages use delete_pdf_pages,' and explains the order-string behavior needed to avoid unintended page drops.

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