Semantic search
calibre_semantic_searchSearch a Calibre ebook library using semantic meaning, keyword, or hybrid mode. Retrieve relevant books or passages within a book, and optionally search figure captions for diagrams or charts.
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. filter accepts a bundle name to scope library searches (list bundles via calibre_manage_bundles).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid | |
| topK | No | ||
| query | Yes | ||
| scope | No | library | |
| bookId | No | ||
| filter | No | ||
| target | No | text | |
| library | No | ||
| include_excluded | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| note | No | ||
| count | No | ||
| scope | No | ||
| bookId | No | ||
| filter | No | ||
| target | No | ||
| bookIds | No | ||
| figures | No | ||
| results | No | ||
| maxScore | No | ||
| passages | No | ||
| reranked | No | ||
| maxRerank | No | ||
| lowConfidence | No | ||
| semanticReason | No | ||
| exclusionsApplied | No | ||
| semanticAvailable | No |