Skip to main content
Glama

compress_pdf

Reduce PDF file size by bundling internal objects into compressed streams and stripping duplicate structures for smaller documents to store or share.

Instructions

Compacts and shrinks PDF file size by bundling internal PDF objects into compressed streams and stripping duplicate structures.

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": {
      "pdf": "<pdf>"
    },
    "name": "compress_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdfYesSource PDF document as base64 data URI or public http/https URL
output_filenameNoOutput filename (default: "compressed.pdf")compressed.pdf

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the internal method (bundling objects into compressed streams, stripping duplicate structures), which hints at irreversible restructuring, but never says whether the source file is modified, whether content/quality is preserved, or how the result is returned (file, URL, base64) — a significant gap for a no-output-schema file-producing tool.

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 well-formed sentence, front-loaded with the verb and effect, with zero filler. The mechanism clause earns its place by explaining how compression is achieved.

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 tool with no annotations, no output schema, and no statement about return values or whether the original is altered, one sentence is not enough. An agent cannot tell what it receives back or whether re-running is safe, which are the key unknowns here.

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 description coverage is 100%, so both parameters are already documented; baseline would be 3. The description adds the conceptual frame of 'shrinking,' but it does not mention output_filename or clarify the returned artifact. Slightly generous at 4 given the schema does all the parameter work; effectively a baseline-level contribution.

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 ('Compacts and shrinks PDF file size') plus the mechanism, so an agent immediately knows this is the size-reduction tool. It does not explicitly differentiate itself from siblings such as render_pdf or split_pdf, which can also change output size.

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 only implied: an agent can infer it should call this when a PDF is too large. There is no explicit when-to-use statement, no prerequisites (e.g., URL must be publicly reachable), and no guidance on alternatives that also reduce footprint.

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