add_document
Publish markdown as an EPUB book in Kavita's Reports library; reusing an existing title replaces that book and keeps reading progress.
Instructions
Build an EPUB from markdown and put it in the Kavita library "Reports".
Publishing a title that already exists replaces that book (same folder, same Kavita series, reading progress kept); a new title is a new book. Images only as data: URIs (base64, up to 1 MiB each); any other image (a URL or a path) becomes its alt text. No tags. Returns the series ID when Kavita already has the book or scan_now found it; otherwise Kavita lists it in about 6 minutes. To move a book to another collection, use update_document.
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": {
"markdown": "<markdown>",
"title": "<title>"
},
"name": "add_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Book title, up to 200 characters. The same title replaces the same book. | |
| author | No | Author shown in Kavita and on the e-reader | Claude |
| summary | No | Short description shown in Kavita | |
| language | No | Language code, e.g. en or sv | en |
| markdown | Yes | The document, in markdown. Headings become the table of contents. | |
| scan_now | No | Ask Kavita to scan the Reports library now (seconds) instead of waiting for its folder watcher (about 6 minutes). Needs an admin Kavita key. | |
| collection | No | Kavita collection to put the book in (reused by name, created if new) |