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, output includes Epublys branding. Pro ($9/mo): 30MB per operation, unlimited daily operations, 60 req/min, no branding.

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

A4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does real work: it discloses size caps per tier, daily and per-minute rate limits, output branding on the free tier, and the exact error conditions plus the tool to call next. The remaining gap is mutation semantics — it never states that the original is untouched and the compressed result is a new file returned by the call.

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?

Front-loaded with the purpose in sentence one, then a compact, clearly delineated tier block and a single conditional routing instruction. Every sentence carries information an agent would act on; nothing is redundant with the schema.

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 partially compensates by explaining output naming from `name` and the branding suffix on free tier. It does not describe the actual response shape (base64 payload vs. download URL) or how a partial-asset-strip failure surfaces, which leaves a modest gap for a file-transform tool.

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%, so the schema already documents all four parameters, establishing a baseline of 3. The description adds only marginal value beyond that — it clarifies what 'strip unused assets' means (images, fonts) but says nothing about `level` or the `file` payload encoding.

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?

States a specific verb and resource: 'Compress an EPUB file to reduce its size', plus the optional asset-stripping behavior. It is clearly distinguishable from siblings like merge_epub, split_epub, or validate_epub by the verb alone, though it never explicitly names those alternatives.

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?

Gives concrete operational context: free vs Pro limits, and an explicit routing rule — 'When a call is refused with daily_limited or a Pro-only error, call the upgrade_to_pro tool'. It lacks any statement about when to prefer this over sibling tools (e.g. split_epub to shrink a file another way), so it stops short of full when/when-not guidance.

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.