Skip to main content
Glama

FreeDailyPro PDF Tools

pdf_compress_size

Read-onlyIdempotent

Shrink a PDF to a size you need, for example under 2 MB (the site's File size mode). Runs Balanced, Aggressive and Extreme gentlest first and stops at the first that fits; otherwise returns the smallest file with targetMet: false and limitReason. limit caps how far it goes (balanced keeps text selectable). Slow at stronger limits; returns the best level so far (truncated: true) on timeout. A PDF already under the goal comes back unchanged.

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>",
      "targetSize": "<targetSize>"
    },
    "name": "pdf_compress_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow far the steps may go. Default extreme. balanced = text stays selectable; aggressive = pages may become pictures; extreme = greyscale and black-and-white too
fileBase64YesThe PDF, base64 encoded (up to 20 MB, up to 100 pages)
targetSizeYesThe size to reach: a number of bytes, or text such as 2MB or 500KB

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Added

TDQS

A3.9/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations: it discloses the escalation order (Balanced, Aggressive, Extreme, gentlest first), the early-stop condition, the failure shape (smallest file with targetMet: false and limitReason), timeout truncation behavior (truncated: true with best level so far), and the unchanged-file short circuit. It also warns that stronger limits are slow, which is real operational context an agent needs for timeouts.

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 is front-loaded in the first clause, then mechanics in a compact second paragraph. The telegraphic fragments ("Slow at stronger limits") are efficient but slightly clipped, and the level list is enumerated twice with the limit enum, costing a little redundancy.

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?

With no output schema, the description carries the return-value burden and does so: targetMet false, limitReason, truncated true on timeout, and an unchanged file when already under target. For a three-parameter, non-destructive compression tool this is essentially complete; only the exact response encoding is unspecified.

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 coverage is 100% and the description largely restates it — "balanced keeps text selectable" duplicates the enum description, and the 20 MB / 100 page bounds live in the schema. It adds some meaning by tying targetSize to concrete examples ("under 2 MB") and connecting limit to escalation depth, but nothing about format edge cases beyond what the schema already supplies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Shrink a PDF to a size you need, for example under 2 MB" names a specific verb and resource plus the defining mode (target-size compression that escalates through levels), which meaningfully separates it from the fixed-level siblings like pdf_compress_balanced or pdf_compress_extreme. It stops short of naming those siblings explicitly, so the differentiation is implied by behavior rather than stated.

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 conveys the operating context well: it applies when a target size matters, returns the file unchanged if already small enough, and "limit caps how far it goes" frames the escalation choice. It never says when to prefer this over the single-level compress tools or what tradeoff justifies each limit value beyond the schema's own enum text.

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