Semantic search
calibre_semantic_searchSearch a Calibre ebook library using semantic meaning, keyword, or hybrid modes. Find relevant books or passages within a specific book, or search figure captions for diagrams.
Instructions
Meaning-based search over the local index. scope=library ranks books; scope=book (needs bookId) ranks passages within one book. target=figures searches figure captions instead of text — use when the user asks for a diagram/chart/schema; hits point at calibre_get_figures for the pixels. mode=hybrid (default) fuses semantic + keyword matches; mode=vector is semantic-only; mode=keyword is exact keyword/FTS (no model at query time). All modes need an index built by calibre_build_index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid | |
| topK | No | ||
| query | Yes | ||
| scope | No | library | |
| bookId | No | ||
| target | No | text | |
| library | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| note | No | ||
| count | No | ||
| scope | No | ||
| bookId | No | ||
| target | No | ||
| bookIds | No | ||
| figures | No | ||
| results | No | ||
| maxScore | No | ||
| passages | No | ||
| reranked | No | ||
| maxRerank | No | ||
| lowConfidence | No | ||
| semanticReason | No | ||
| semanticAvailable | No |