Skip to main content
Glama

pdf_compress_balanced

Read-onlyIdempotent

Shrink a PDF from freedailypro the gentle way (the site's Balanced mode): tidy the file, empty blank pages, and re-save the pictures inside at about 140 dpi. Text stays selectable; links, bookmarks, form fields and page sizes are kept. Returns the smaller file plus the levels applied. Errors if the PDF is unreadable, password-protected, over 100 pages, or if nothing gets smaller (for example a PDF that is already mostly text); in that case try pdf_compress_aggressive.

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": {
      "fileBase64": "<fileBase64>"
    },
    "name": "pdf_compress_balanced"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileBase64YesThe PDF, base64 encoded (up to 20 MB, up to 100 pages)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavior: what is preserved (selectable text, links, bookmarks, form fields, page sizes), what is normalized (blank pages emptied), and the exact error/precondition set. That goes well beyond what the structured fields declare.

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?

One front-loaded paragraph: what it does, then what it preserves, then returns, then failures and fallback. Dense and largely waste-free, though the parenthetical site reference and the multi-clause preservation list make it slightly wordier than necessary.

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?

With no output schema, the description still says what comes back ('the smaller file plus the levels applied'), and it covers input limits, preconditions, preservation guarantees and the fallback path. An agent has everything needed to call it and to interpret a likely failure.

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?

The single parameter is fully documented in the schema (base64, 20 MB, 100 pages), so the baseline is already met. The description reinforces the page limit as a hard error and confirms no other inputs are needed, though it adds no syntax or encoding detail beyond the 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?

States a specific verb and resource ('Shrink a PDF') and names the exact variant ('the site's Balanced mode') plus its concrete mechanism (~140 dpi image re-save, blank-page removal, tidy). This lets an agent place it precisely against pdf_compress_aggressive, pdf_compress_extreme and the other compression siblings without opening a schema.

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?

Gives explicit when-not conditions (unreadable, password-protected, over 100 pages, or no size reduction such as an already text-only PDF) and routes to a named alternative, pdf_compress_aggressive, for the failure case. The 'gentle way' framing also signals it is the low-aggression end of the compression family.

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