Skip to main content
Glama

docx_to_epub

Convert a Word document (.docx) to a valid EPUB3 ebook. Chapters split on the document's top heading level (Heading 1 in a normal manuscript), or on page breaks, or not at all. Keeps bold/italic, lists, tables, inline images (PNG/JPEG/GIF/WebP), hyperlinks and footnotes; reads the title and author from the document's properties. No Pandoc, no Calibre.

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

Input Schema

NameRequiredDescriptionDefault
fileYesBase64-encoded .docx file content
nameNoOriginal filename — used as the title fallback; the output is named after its stem
titleNoBook title (defaults to the document title, then its first heading)
authorNoAuthor (defaults to the document author)
languageNodc:language of the generated EPUB (BCP 47)en
chapterModeNoWhere chapters startheadings

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does real work: file-size ceilings, 3 ops/day, 15 req/min, branded output on free tier, the specific daily_limited error token, and upgrade routing. What is missing is the shape of a successful response — whether the client receives base64, a URL, or an inline attachment — which matters for a conversion tool.

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?

Front-loaded with the conversion and its output, followed by fidelity details, then the tier block. The pricing section is longer than ideal but every line (limits, error token, escalation tool) changes agent behavior, so it earns its place.

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?

Covers inputs, chaptering behavior, fidelity, quota, error handling and escalation for a 6-parameter tool with no output schema. The one real omission is describing the return value, which the absence of an output schema pushes onto the description.

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 3 is the baseline, but the description adds genuine meaning beyond the schema by explaining what chapterMode's enum actually does — split on top heading level, on page breaks, or not at all. It also notes title/author fall back to document properties, complementing the schema's fallback notes.

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 pair — convert a .docx to a valid EPUB3 — and enumerates the fidelity guarantees (bold/italic, lists, tables, images, footnotes, metadata). The format-specific naming distinguishes it cleanly from siblings like pdf_to_epub and markdown_to_epub without opening either 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?

Implicitly clear that this is the only path for .docx inputs, and it explicitly routes the agent on failure: on daily_limited or a Pro-only error, call upgrade_to_pro and hand the user the checkout link. It does not spell out exclusions (e.g. use markdown_to_epub for .md sources), but those are self-evident from the input format.

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.