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
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Publication date YYYY-MM-DD | |
| isbn | No | eBook ISBN (becomes the EPUB identifier urn:isbn:...) | |
| tags | No | Extra/override style→tag map, e.g. {"Pull Quote":"blockquote", "Chapter Title":"h2"} | |
| cover | No | "first-page" (default), "none", or a path to a cover image (JPG/PNG, ideally 1600x2560) | |
| title | No | ||
| author | No | ||
| layout | No | Reflowable for novels/memoirs (Kindle, Apple Books); fixed keeps the exact page design | reflowable |
| rights | No | e.g. "© 2026 Author Name. All rights reserved." | |
| splitAt | No | Paragraph styles that start a new chapter file | |
| subject | No | e.g. "Biography & Autobiography" | |
| filePath | Yes | Output .epub path | |
| publisher | No | ||
| tocStyles | No | Paragraph styles listed in the ebook navigation TOC (default Section Title, Chapter Title) | |
| description | No | ||
| excludePages | No | Absolute page positions to leave out, e.g. "5" or "1-2" | |
| confirmDestructive | No |