Skip to main content
Glama

PDF Efforts

Rotate PDF pages

rotate_pdf
Idempotent

Rotate all or selected pages of a PDF by 90, 180 or 270 degrees clockwise (saved permanently in the file).

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

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF to rotate.
angleNoClockwise rotation in degrees.
pagesNoPages to rotate: "all", or numbers and ranges such as "1-3, 5, 8-end" ("end" = last page).all

Output Schema

NameRequiredDescriptionDefault
infoNoFacts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf).
noteNoAnything the user should know about the result.
textNoExtracted text (pdf_to_text, ocr_pdf).
filesYesResult files. Download them before expires_at; pass file_id to another tool to chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), so the bar is lower, and the description still adds the key behavioral fact that the rotation is "saved permanently in the file." It also clarifies the direction is clockwise, which prevents a common inversion error. It doesn't say whether the change can be reverted by rotating back or how Pages interact with the persist step.

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?

One tightly constructed sentence: the operation first, the parameter range and direction second, the side effect in a parenthetical at the end. No wasted words.

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 and the input schema is fully documented, so the description only needs to convey the irreversible-write nature, which it does. The only shortfall is not telling the agent how page selection interacts with rotation (per-page metadata set vs. content transform), which matters for a latent rotation tool.

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 file, angle, and pages are all fully documented in the schema, and the description only restates the angle values and the all-vs-selected distinction. Baseline 3 is appropriate since the schema carries the semantic load.

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 ("Rotate ... pages of a PDF") plus the scope (all or selected pages) and the allowed angles. It implicitly separates itself from siblings like delete_pages or extract_pages, but never names or contrasts an alternative explicitly.

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 rather than stated: an agent can infer this is the tool for turning pages, and no other sibling does rotation. However, there is no guidance on when not to use it, no prerequisites, and no mention of alternatives such as pdf_to_images for previewing orientation.

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