Skip to main content
Glama

compress_pdf

Reduce a PDF's file size losslessly by consolidating object streams (keeps text selectable). Returns base64 plus before/after sizes. Note: does not re-encode embedded images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdfYesThe PDF as a base64 string or https URL.
levelNomedium also strips subject/keywords metadata. Default medium.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the compression is lossless, keeps text selectable, does not re-encode images, and returns base64 with size metrics. It also notes level 'medium' strips metadata. This is fairly thorough for a compression tool.

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?

The description is two sentences plus a note, front-loaded with the main purpose. Every sentence provides useful information. Minor deduction for not being even more compact, but it is well-structured.

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?

Given the tool has 2 parameters and no output schema, the description covers core functionality, return value, and a key limitation. Missing details like error handling or full scope of lossless guarantee, but overall sufficient for effective use.

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. The description adds value by explaining that 'medium' level strips subject/keywords metadata and sets default to medium. It also clarifies the 'pdf' parameter can be base64 or URL, which is not explicit in schema property descriptions.

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 clearly states the tool reduces PDF file size losslessly by consolidating object streams, which is specific to compression. It distinguishes from siblings like merge_pdf or split_pdf by focusing on size reduction.

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 description does not provide explicit guidance on when to use compress_pdf versus alternatives. It mentions a limitation (no image re-encoding) but no when-to-use or when-not-to-use criteria relative to sibling tools.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct PDF operation: compression, page deletion, info retrieval, merging, protection, rotation, and splitting. There is no overlap or ambiguity between tool purposes.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., compress_pdf, delete_pages), making it easy to predict functionality from the name.

Tool Count5/5

With 7 tools covering essential PDF manipulations, the count is well-scoped for the domain. Each tool serves a clear purpose without unnecessary redundancy.

Completeness4/5

The set covers core PDF operations (CRUD for pages, compression, protection, info). Minor gaps exist (e.g., no watermarking or annotation), but the surface is sufficient for typical workflows.

Resources