Skip to main content
Glama

Crop or scale pages

pdf_resize_pages
Idempotent

Crop margins or scale PDF page content to resize pages. Choose pages and output a new PDF without overwriting originals.

Instructions

Crop a margin from each edge (mode crop, margin in points) or scale page content (mode scale, factor 0.1–4).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
inputYesPath to a PDF inside an allowed folder (absolute, or relative to the first allowed folder).
pagesNoPage numbers or ranges, such as "1, 3-5". Omit for every page.
factorNoScale factor (scale).
marginNoPoints trimmed from each edge (crop).
outputYesPath for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYes
pagesYes
outputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, idempotentHint=true, and openWorldHint=false, so the safety profile is covered by structured data. The description adds the parameter ranges for crop vs scale but says nothing about what happens to the source file, output-file constraints, or processing behavior beyond what the schema already specifies.

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?

A single sentence with zero filler, front-loading the two operating modes before their parameters. Every clause carries information the agent needs.

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?

With annotations, an output schema, and near-complete schema descriptions, the remaining burden on the prose is small, and it covers both modes adequately. It omits any note on page selection behavior (the 'pages' parameter) or typical input/output expectations, but nothing essential to invoking the tool is missing.

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 83%, so the baseline is 3, but the description goes further by explicitly binding mode=crop to margin (points) and mode=scale to factor (0.1–4), clarifying which parameter is live in each mode. That conditional mapping adds real meaning beyond the schema's simple '(crop)'/'(scale)' suffixes.

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 names two specific operations—cropping a margin from each edge and scaling page content—and ties each to its mode value. This is a distinct verb+resource pair that no sibling (rotate_pages, extract_pages, add_watermark) performs, so an agent can identify it immediately.

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?

The mode/parameter mapping ('mode crop, margin in points' vs 'mode scale, factor 0.1–4') implies which mode to pick, but there is no explicit when-to-use-crop-vs-scale guidance and no mention of alternatives such as rotate_pages or add_watermark. Usage is inferable rather than stated.

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