Skip to main content
Glama

Compress a local PDF

abox_pdf_compress

Compress PDF files by recompressing embedded images with presets that trade resolution and quality for smaller size. Keeps page layout and reports actual savings.

Instructions

Recompress supported PDF images and rewrite structure using the existing abox.tools engine. Presets trade image resolution and quality for size. Keeps page content streams and verifies page order and geometry; image pixels can change. Reports actual savings and may produce a larger file. No byte-target search. Writes a new unencrypted PDF; signatures become invalid.

Input Schema

NameRequiredDescriptionDefault
dpiNoOptional resolution override. Zero disables image downsampling.
presetNoscreen
qualityNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.
strip_metadataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4/5.0
Behavior5/5

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

Discloses behavior beyond the annotations: it keeps content streams, verifies page order/geometry, pixels may change, output can be larger, and critically that signatures become invalid and the output is an unencrypted new file. That last point matters because destructiveHint=false could otherwise suggest no meaningful side effects.

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?

Six short statements, each carrying a distinct fact, with the core operation and the most consequential warning (signature invalidation) appropriately placed. No restatement of the name or schema fields.

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?

No output schema exists, and the description does mention that it reports actual savings, so return behavior is partially covered. For a 6-parameter local-file mutation tool the description is nearly complete, though the strip_metadata and preset/dpi interaction remain unaddressed.

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 50%; the description adds meaning for presets and quality ('quality for size') and implicitly dpi ('image resolution'). It says nothing about strip_metadata or how preset and dpi interact, so the undocumented half remains unexplained.

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+resource ('Recompress supported PDF images and rewrite structure') and scopes it to local files via the title. It implicitly separates itself from abox_image_compress by operating on PDF structure, but never names 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?

It gives useful framing ('Presets trade image resolution and quality for size', 'No byte-target search'), which tells the agent what the tool will not do, but there is no explicit when-to-use versus abox_image_compress or abox_pdf_split guidance.

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