Skip to main content
Glama
utilitlyPDF

@utilitly/mcp

by utilitlyPDF

Reorder pages

reorder_pages

Reorder PDF pages in a specified sequence and save the result as a new file, leaving the original unchanged. Use pdf_info to confirm page count before reordering.

Instructions

Puts the pages in a new order, named with -reordered. The order must list every page exactly once; use pdf_info for the page count. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a PDF file, or one starting with ~/.
orderYesEvery page number once, in the new order, e.g. [3, 1, 2]
output_pathNoOptional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input.

Output Schema

NameRequiredDescriptionDefault
pagesYesPages in the new PDF
output_pathYesWhere the new PDF was written

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the output filename convention, that the result is written as a new file beside the input (or to output_path), that no existing file is ever replaced, and that the input is untouched. These details align with destructiveHint=false and idempotentHint=false while telling the agent precisely what side effects to expect.

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?

Two tight sentences, front-loaded with the operation and its output naming, then the ordering constraint and safety guarantees. No redundant or filler text.

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 3-parameter mutation tool with an output schema and full annotation coverage, everything an agent needs is present: input requirements, page-count source, output location rules, and overwrite/immutability guarantees. Return-value detail is correctly left to the output 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%, so path, order, and output_path are already fully documented in the schema, including the example [3, 1, 2] and the .pdf/not-yet-existing constraint. The description restates the all-pages-once rule and the default output location but adds no syntax or format detail beyond structured fields, so 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 and resource ("Puts the pages in a new order") plus the concrete output identity via the `-reordered` suffix, so an agent knows exactly what is produced. It does not explicitly contrast with the closest siblings (extract_pages, delete_pages, rotate_pdf), so differentiation relies on the tool name alone.

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 order must list every page exactly once; use pdf_info for the page count" gives a hard precondition and routes the agent to the sibling that supplies the missing input. It stops short of naming alternatives for partial reordering or subsetting (extract_pages/delete_pages), which would have made it a 5.

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