Skip to main content
Glama
InDesign MCP Server

InDesign MCP Server

by vinitdeep

export_ebook

Exports the active InDesign book as a structured EPUB ebook, splitting chapters by paragraph styles, mapping styles to HTML, building a navigation TOC, and adding metadata and cover settings.

Instructions

Export the active book as an EPUB ebook (reflowable by default) with proper ebook structure: each chapter in its own file (split at paragraph styles, default "Chapter Number" and "Section Title"), paragraph styles mapped to HTML tags (Chapter Number/Section Title/Book Title → h1, Chapter Title → h2, body styles → p; override with tags), a navigation table of contents built from heading styles, metadata (title, author, publisher, ISBN, description, rights) and a cover (first page, an image file, or none). Running heads and page numbers on parent pages are never exported. excludePages leaves out print-only pages, e.g. the printed contents page whose page numbers mean nothing in an ebook. Requires confirmDestructive:true because it writes a file.

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": {
      "filePath": "<filePath>"
    },
    "name": "export_ebook"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoPublication date YYYY-MM-DD
isbnNoeBook ISBN (becomes the EPUB identifier urn:isbn:...)
tagsNoExtra/override style→tag map, e.g. {"Pull Quote":"blockquote", "Chapter Title":"h2"}
coverNo"first-page" (default), "none", or a path to a cover image (JPG/PNG, ideally 1600x2560)
titleNo
authorNo
layoutNoReflowable for novels/memoirs (Kindle, Apple Books); fixed keeps the exact page designreflowable
rightsNoe.g. "© 2026 Author Name. All rights reserved."
splitAtNoParagraph styles that start a new chapter file
subjectNoe.g. "Biography & Autobiography"
filePathYesOutput .epub path
publisherNo
tocStylesNoParagraph styles listed in the ebook navigation TOC (default Section Title, Chapter Title)
descriptionNo
excludePagesNoAbsolute page positions to leave out, e.g. "5" or "1-2"
confirmDestructiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden and does substantial work: it discloses chapter splitting behavior, style→tag mapping, TOC construction, metadata/cover handling, what is deliberately never exported (running heads, page numbers on parent pages), and the notable requirement that confirmDestructive:true is needed because a file is written. Gaps remain around overwrite behavior of an existing filePath and what the tool reports on success/failure.

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?

The purpose is front-loaded in the first clause, followed by an organized parenthetical covering structure, styles, TOC, metadata, cover, exclusions, and the destructive-confirmation note. Highly dense but every clause carries distinct technical information; nothing is redundant padding.

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?

For a 16-parameter mutation tool with no annotations and no output schema, the description is unusually complete, covering output structure, formatting rules, exclusions, and the confirm-destructive requirement. The remaining shortfall is that it does not state the return value or overwrite/error behavior, which matter for an agent verifying success.

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?

With 69% schema coverage, the description compensates well by supplying defaults the schema omits: splitAt defaults to 'Chapter Number' and 'Section Title', tocStyles defaults to Section Title/Chapter Title, cover defaults to first-page, and tags is described as an override map with an example. It adds real meaning beyond the schema for the highest-impact formatting parameters.

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+resource: 'Export the active book as an EPUB ebook', and immediately scopes the output format and structure. However, there is a sibling named export_epub that appears near-identical, and the description never explains how this tool differs from it, leaving ambiguity for an agent choosing between the two.

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?

Some usage guidance is embedded: 'reflowable by default' with 'Reflowable for novels/memoirs (Kindle, Apple Books); fixed keeps the exact page design', and excludePages is explained with a concrete scenario ('the printed contents page whose page numbers mean nothing in an ebook'). But there is no explicit when-to-use vs export_epub/export_pdf/export_images, and no preconditions beyond the confirmDestructive note.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.