Skip to main content
Glama

compress_epub

Compress an EPUB file to reduce its size. Can optionally strip unused assets (images, fonts not referenced by any chapter).

Free tier: 5MB/file (10MB for pdf-to-epub, 15MB for split), 3 operations/day, 15 req/min; the converters, merge, split and metadata editing credit Epublys in the output. Pro ($9/mo): 30MB per operation, unlimited daily operations, 60 req/min.

When a call is refused with daily_limited or a Pro-only error, call the upgrade_to_pro tool — it returns a checkout link to hand the user. Details: https://epublys.com/pricing

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_epub"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesBase64-encoded EPUB file content
nameNoOriginal filename — the output is named after its stem (e.g. "Book.epub" gives "Book (compressed).epub"); without it the output keeps a fixed name
levelNoCompression level (1=fastest, 9=smallest)
stripUnusedNoRemove assets not referenced by any chapter

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does a solid job: it discloses file-size ceilings per tier, per-day and per-minute quotas, that certain operations credit Epublys in the output, and that stripUnused removes unreferenced assets. It does not say whether compression is lossy/quality-affecting or whether large files fail versus queue, which keeps it below 5.

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?

The purpose is front-loaded in the first sentence and the tier/upgrade information follows logically. The pricing block is dense but each clause carries decision-relevant information (limits, quotas, upgrade routing); the external pricing URL is the only mildly expendable element.

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

Completeness3/5

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

There is no output schema, and the description never states what the tool returns (e.g., base64 payload, download link, or filename from the name stem). For a 4-parameter file-transform tool with zero annotations, the tier and upgrade behavior is well covered but the response shape remains an inferential gap.

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%, so the schema already documents file, name, level, and stripUnused including ranges and defaults. The description only echoes the stripUnused capability ("optionally strip unused assets") and adds no new syntax, unit, or interaction detail beyond the schema, making 3 the correct baseline.

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?

The description opens with a specific verb+resource ("Compress an EPUB file to reduce its size") and adds the optional asset-stripping behavior, which clearly separates it from siblings like merge_epub, split_epub, and the converters. It stops short of explicitly naming a sibling it should not be confused with, so it lands at 4 rather than 5.

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 gives concrete operational context: free-tier size caps, daily/rate limits, Pro limits, and an explicit fallback instruction to call `upgrade_to_pro` when a call is refused with daily_limited or a Pro-only error. What's missing is guidance on when to prefer compress_epub over alternatives such as re-converting or splitting, so the usage selection logic is only partially covered.

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.