Skip to main content
Glama

Compress PDF

compress_pdf
Idempotent

Compress a PDF to reduce its file size and return a new versioned file.

MANDATORY: Before calling this tool, call 'check_upload_status' with the session_id to confirm the file exists and retrieve the latest job_id. Skipping this check and calling compress_pdf directly is FORBIDDEN.

Each call creates a NEW job_id (with parent_job_id linking to the source). The original PDF version is preserved unchanged — previous versions remain accessible. After compression completes, call 'view_pdf' with the new job_id to display the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID of the PDF to compress (use the latest job_id from check_upload_status).
session_idYesSession ID that the job belongs to.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
filenameYes
mime_typeYes
reply_noteYes
session_idYes
download_urlYes
instructionsYes
original_sizeYes
parent_job_idYes
compressed_sizeYes
size_reduction_percentYes

TDQS

A4.1/5.0
Behavior1/5

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

Description states 'Each call creates a NEW job_id', implying non-idempotent behavior, but annotation declares idempotentHint=true. This is a direct contradiction, requiring score 1 per rubric.

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?

Every sentence serves a purpose: core action, mandatory prerequisite, versioning behavior, and post-compression step. No wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive coverage: prerequisites, versioning, and follow-up actions. Output schema exists, so return values are not needed. Complete for this tool's complexity.

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%, baseline 3. Description adds usage context for job_id (use latest from check_upload_status), improving semantics beyond schema.

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?

Clear verb and resource: 'Compress a PDF to reduce its file size and return a new versioned file.' Distinguishes from siblings by specifying compression and versioning behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit prerequisite: mandatory call to check_upload_status before using this tool. Also states that each call creates a new job_id, guiding proper usage sequence.

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.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: uploads are split by context (single, batch, widget), content inspection is split by method (text, images, redaction lines), and password operations are split by state (set vs change). Descriptions explicitly cross-reference to prevent confusion.

Naming Consistency4/5

All tools start with a verb (upload, check, compare, compress, create, delete, get, list, redact, set, change, view), but the position of 'pdf' varies (suffix in compress_pdf, middle in get_pdf_info) and some names are compound like 'batch_upload_pdf' and 'get_latest_comparison'. Pattern is readable but not perfectly uniform.

Tool Count4/5

16 tools is slightly above the ideal 3-15 range, but each tool maps to a distinct operation or workflow step in PDF handling. The count feels justified given the breadth of features (upload, compress, delete, password, redact, compare).

Completeness4/5

The surface covers the core PDF lifecycle: upload, view, compress, delete pages, password protection, redaction, and comparison. Minor gaps exist (no merge, split, or rotate), but the primary workflows are fully supported with mandatory pre/post checks.