Build semantic index
calibre_build_indexBuild a searchable semantic index for Calibre books selected by ID or query, extracting, chunking, and embedding text. Re-run after adding books to keep search results current.
Instructions
Build the semantic index for specific books (select them with bookId, ids, or query; at least one is required; to index everything, pass a query that matches every book). A query selects ALL matching books (no 100-book cap); a call still working after ~45 s returns a "still running" status (not an error) while the build keeps committing in the background — re-run the same call to get its result; only one build runs per library at a time, and up-to-date books are skipped. Extracts, chunks, and embeds each book. Set keywordOnly=true (or when the embedding model is absent, it happens automatically) to build a keyword-only index that powers mode:"keyword" search with zero ML dependencies. Re-run after adding books; use force to re-index unchanged ones. Set enableFts=true to also turn on the Calibre full-text index for the library (needs writes enabled on this server; with writes off the semantic build still runs and the fts.status result field is write_disabled; already-enabled is a no-op; Calibre indexes in the background and the call does not wait). Set prune=true to also drop index entries for books that no longer exist in the library (removals/merges leave searchable orphans behind).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calibre_build_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | ||
| force | No | ||
| prune | No | ||
| query | No | ||
| bookId | No | ||
| library | No | ||
| enableFts | No | ||
| keywordOnly | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fts | No | ||
| chunks | No | ||
| figures | No | ||
| failures | No | ||
| booksDone | No | ||
| elapsedMs | No | ||
| indexedIds | No | ||
| removedIds | No | ||
| bookDetails | No | ||
| keywordOnly | No | ||
| prunedBooks | No | ||
| booksIndexed | No | ||
| booksSkipped | No | ||
| prunedChunks | No | ||
| runningBuild | No | ||
| stillRunning | No | ||
| prunedFigures | No | ||
| booksPreserved | No | ||
| booksRefreshed | No | ||
| booksRequested | No | ||
| semanticReason | No | ||
| semanticAvailable | No | Is the embedding model usable on this server? true even for a requested keywordOnly build when the model is present (vector & hybrid then need a rebuild without keywordOnly); false only when it is missing or failed to load. The build mode is keywordOnly. | |
| backgroundBuildFailed | No |