Skip to main content
Glama

Compress a PDF

pdf_compress

Structurally compress a PDF (remove redundancy, optimize structure) and return the reduced document. Use this when the user wants a smaller PDF.

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": {
      "file": "<file>"
    },
    "name": "pdf_compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesBase64-encoded file bytes (no data: URL prefix).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, so the safety profile is partly covered. The description adds that it 'returns the reduced document' (implying output rather than in-place mutation), but does not disclose whether the original is preserved, expected quality/size tradeoffs, or any size limits despite the 11MB input cap.

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?

Two sentences, front-loaded with the action and mechanism, followed by the usage trigger. No filler; every clause earns its place.

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?

For a single-parameter tool with no output schema, the description adequately covers what it does, what it returns, and when to use it. The only gap is the lack of clarification on whether the source document is modified or a new file returned.

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 description coverage is 100% for the single 'file' parameter, so the schema fully documents the base64 encoding requirement and length bounds. The description adds nothing about the parameter, which is fine given the baseline-3 rule.

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 states a specific verb+resource (compress a PDF) and clarifies the mechanism (remove redundancy, optimize structure) plus the return (reduced document). No sibling tool performs compression, so the purpose is unambiguous against the list.

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

Usage Guidelines4/5

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

'Use this when the user wants a smaller PDF' gives a clear triggering context. There is no competing compression sibling to route away from, so the absence of explicit exclusions is minor, but no when-not conditions are stated.

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.

Resources