Skip to main content
Glama
Paperboy

Paperboy

Official
by sudostash

rearrange_pages

DestructiveIdempotent

Reorder, duplicate, or reverse PDF pages using a custom page order sequence; unlisted pages are dropped by default, and a password unlocks files that forbid document assembly.

Instructions

Reorder/duplicate/reverse pages. page_order e.g. "3,1,2", "5-1" (reverse), "last,1-4".

Unlisted pages are dropped unless append_unlisted=true. Pages may repeat to duplicate. Needs the owner password if the PDF forbids document assembly.

Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.

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": {
      "input_path": "<input_path>",
      "page_order": "<page_order>"
    },
    "name": "rearrange_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
passwordNo
overwriteNo
input_pathYes
page_orderYes
output_pathNo
append_unlistedNo

Output Schema

NameRequiredDescriptionDefault
orderYes
pagesYes
outputYes
password_protectedYes
user_password_changedYes
permissions_restrictedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "order": {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "title": "Order",
      +      "type": "array"
      +    },
      +    "output": {
      +      "title": "Output",
      +      "type": "string"
      +    },
      +    "pages": {
      +      "title": "Pages",
      +      "type": "integer"
      +    },
      +    "password_protected": {
      +      "title": "Password Protected",
      +      "type": "boolean"
      +    },
      +    "permissions_restricted": {
      +      "title": "Permissions Restricted",
      +      "type": "boolean"
      +    },
      +    "user_password_changed": {
      +      "title": "User Password Changed",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "password_protected",
      +    "permissions_restricted",
      +    "user_password_changed",
      +    "output",
      +    "pages",
      +    "order"
      +  ],
      +  "title": "RearrangeResult",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Goes well past annotations (destructiveHint=true) by spelling out that unlisted pages are discarded by default, that repeating a page number duplicates it, that the owner password is required when document assembly is forbidden, and that 'ask' routes the password through a local prompt so it never enters the chat.

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?

Front-loaded with the core operation, then line-separated notes on page_order syntax, unlisted-page handling, and the password flow. No filler; every sentence carries operational information.

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?

An output schema exists, so return values need no explanation, and destructive semantics plus auth requirements are covered. The remaining gap is the unmentioned overwrite and output_path behavior, which matters for a write tool that otherwise has zero schema documentation.

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 0%, and the description compensates strongly for the two semantically tricky parameters — page_order syntax (ranges, reverse, 'last') and append_unlisted — plus the 'ask' sentinel for password. However input_path, output_path, and overwrite receive no explanation at all, leaving half the parameters undocumented.

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 three specific verbs (reorder, duplicate, reverse) against a specific resource (pages), and the duplicate-via-repeat rule plus the drop-unlisted rule distinguish it from delete_pages or extract_pages without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the operations described, and the description clarifies the append_unlisted branch, but it never states when to prefer this over sibling page-manipulation tools or any precondition scenarios beyond the password note.

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