Build the semantic search index
zotero_indexBuild and manage a local hybrid-search index for your Zotero library, enabling fast keyword and vector search. Start a background build, then poll status until done.
Instructions
Manage the local hybrid-search index used by zotero_semantic_search. The build runs as a background job on the server, so this tool returns immediately — never blocks on large libraries. action: "build" (or "refresh") starts a background build: it pages the library's top-level items (100-at-a-time, capped at 5000 items unless a smaller limit is given), indexes their text (title, abstract, creators, tags) for BM25 keyword search and — if an embedding provider is configured — vector search, persisting partial progress atomically as it goes. Start a build, then POLL action: "status" every few seconds until state is "done" (or "error"); calling build again while one is running just returns current progress. action: "status" reports the build state (idle|building|done|error), fetch/embed progress, index size and the active embedder. action: "stop" cancels a running build (partial data is kept and stays searchable). A partially built index is always usable for keyword search. Local embeddings are CPU-bound (see ZOTEUS_EMBEDDINGS), so large builds take a while — poll status rather than retrying build.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max items to index (default 5000, which is also the hard cap). | |
| action | Yes | ||
| library_id | No | ||
| library_type | No |