Skip to main content
Glama

Reorder, rotate or delete pages

organize_pages

Builds a new PDF from the pages listed, in that order. Each item is a page number, or { page, rotate } with rotate 90, 180 or 270. Pages left out are deleted. The original is not changed. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.

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>",
      "pages": "<pages>"
    },
    "name": "organize_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesOne file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.
pagesYesThe new document's pages in order: page numbers, or { page, rotate }.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / file / description
      Previous value: -"One file: file_id, url or base64."New value: +"One file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs."
    • changedInput schema / properties / file / properties / file_id / description
      Previous value: -"A file id from an earlier upload, or the id of a file attached in the chat."New value: +"A file id from an earlier upload, the upload_id from get_upload_link once the person says it is done, or the id of a file attached in the chat."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds real context beyond the annotations: the output is a new document, omitted pages are deleted, and 'The original is not changed', which reconciles the 'delete pages' framing with destructiveHint=false. It also notes an https url is downloaded once from a public address only. It does not say how the resulting file is returned.

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?

Front-loaded with what the tool does and what deletion means, then the file-handling rule. The 'pass the person's own file exactly / never rebuild' instruction is duplicated verbatim in the schema's file description, which is mild redundancy but defensible as a safety guardrail.

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?

Inputs and safety behavior are well covered for a nested two-parameter transform, but with no output schema the description never says what comes back — the new PDF bytes, a file id, or an async job needing get_job_result. That is a meaningful gap for an agent deciding how to finish the task.

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 coverage is 100%, so baseline is 3, but the description contributes semantics the schema lacks: array order defines output order, and any page not listed is dropped. It also restates the page/rotate item shapes, though it lists only 90/180/270 while the schema also permits rotate 0.

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?

Opens with a specific verb and resource — 'Builds a new PDF from the pages listed, in that order' — and immediately adds the scoping rule 'Pages left out are deleted', which separates it from merge_pdfs and split_pdf without needing to name them.

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?

Gives clear operating guidance: supply the person's own file exactly, and if that isn't possible, call get_upload_link or ask for an https link — naming a concrete sibling as the fallback. It stops short of an explicit 'do not use this when X, use split_pdf instead' exclusion.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources