Skip to main content
Glama
WendongAI

1pdf

by WendongAI

sort_pages

Reorder pages in a PDF by specifying a custom page order, such as [3,1,2] to move page 3 to the front.

Instructions

Reorder pages in a PDF by custom order. E.g. order [3,1,2] puts page 3 first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesAbsolute path to the PDF file
orderYesNew page order as 1-based indices, e.g. [3,1,2]
output_nameNoOutput file path (defaults to same dir with suffix)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not state whether the operation is destructive (e.g., overwrites the original file) or creates a new file, nor does it disclose error handling, permissions, or return behavior. The schema mentions output_name defaults to a new file, but the description itself adds no behavioral context beyond the core action.

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 two sentences with a concrete example, fully front-loaded. Every word earns its place, and the example is highly illustrative. No wasted text or redundancy.

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

Completeness2/5

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

For a PDF mutation tool with no annotations and no output schema, the description is too thin. It lacks essential context such as whether the original file is modified or a new file is created, what the return value is, and edge cases for invalid page orders. The schema partially covers the output_name default, but the overall tool behavior remains under-specified.

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 description coverage is 100%, so the baseline is 3. The description adds an example that clarifies the 'order' parameter's 1-based index semantics, but the schema already documents this. The description does not add new meaning beyond what the schema provides, so no extra credit.

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 clearly states the tool's function: 'Reorder pages in a PDF by custom order.' It specifies the verb (reorder), resource (pages in PDF), and scope (custom order). The example further clarifies the behavior, distinguishing it from sibling tools like reverse_pages which only reverse order.

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 description provides a clear context for use: when you need to reorder pages in a custom sequence. It does not explicitly mention alternatives or when not to use it, but the example and wording make the intended use obvious. It lacks explicit exclusion or alternative references, so it falls short of a perfect 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WendongAI/onepdf-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server