Skip to main content
Glama

Compress PDF

compress_pdf

Makes a PDF smaller. Choose a level, or a target size in KB. Returns a link to the smaller PDF; the original is not changed. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.

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": "compress_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesOne file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.
levelNobasic (the usual) keeps good quality, strong makes it smallest, quality changes the least.basic
targetKbNoAim for this size in KB instead of a level.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / file / description
      Previous value: -"One file: file_id, url or base64."New value: +"One file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs."
    • changedInput schema / properties / file / properties / file_id / description
      Previous value: -"A file id from an earlier upload, or the id of a file attached in the chat."New value: +"A file id from an earlier upload, the upload_id from get_upload_link once the person says it is done, or the id of a file attached in the chat."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds that the original file is untouched and that the result is delivered as a link, which is exactly the context an agent needs given the non-readOnly hint. It also adds an anti-fabrication guardrail ("Never create, rewrite, summarise or rebuild a document"). It says nothing about processing time, size limits for compression quality, or failure modes, so it stops short of full disclosure.

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?

Purpose, output, and immutability are front-loaded in the first two sentences, and the fallback path follows logically. The only waste is the file-fidelity instruction, which is repeated verbatim from the schema and consumes roughly a third of the description.

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 three-parameter tool with a nested file object and no output schema, the description supplies the key return contract (a link), the immutability guarantee, the level-vs-size tradeoff, and the escalation path to get_upload_link. Remaining gaps, such as what the link's lifetime is or how compression quality interacts with level, are modest.

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 the baseline is 3, but the description adds the mutual-exclusivity semantics the schema never states: targetKb is used "instead of a level." It also reinforces the file-fidelity requirement for the nested file object. The enum meanings themselves are already fully spelled out in the schema, so no further credit is due.

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?

"Makes a PDF smaller" is a specific verb+resource, immediately qualified by the two ways to control the result (a level, or a target size in KB). It also states the output form (a link to the smaller PDF) and the non-destructive contract (the original is not changed), so an agent can distinguish this from convert_pdf, merge_pdfs, or split_pdf without opening any schema.

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?

It explicitly routes the agent to an alternative when the file cannot be passed: "call get_upload_link or ask for an https link to it." The level-vs-targetKb choice is also framed as an either/or. What is missing is any when-not guidance (e.g. choosing between compress_pdf and convert_pdf, or what to do if the file is already small).

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