Attachment full-text
zotero_fulltextRetrieve, store, or track full-text content of Zotero attachment items: get indexed text by key, set extracted text, or list attachments changed since a given library version.
Instructions
Not a search — to find which items contain a term, use zotero_search_items with qmode=everything. This reads, sets, or tracks one attachment's already-extracted full text by key. action: "get" returns the indexed text content plus indexing stats for an attachment item (only attachment items have full text; returns found:false if none); "set" stores extracted text for an attachment (provide content and the indexing counts); "since" returns the map of attachment keys whose full text changed after a given library version (useful for incremental indexing). Only attachment items support full text. "get" and "since" read through the running Zotero desktop app when there is one (no cloud key needed), otherwise the cloud Web API; "set" always writes via the cloud Web API, which has no desktop equivalent, so it needs ZOTERO_API_KEY even for the personal library.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Library version for "since" (default 0). | |
| action | Yes | What to do. "get" reads one attachment's indexed text (needs `item_key`); "set" stores extracted text for it (needs `item_key` + `content`, cloud only); "since" lists attachment keys whose text changed after `since`. | |
| content | No | Extracted text (set). | |
| item_key | No | Attachment item key (get/set). | |
| library_id | No | Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id. | |
| total_chars | No | Characters the document holds in total (set). | |
| total_pages | No | Pages the document holds in total (set); PDFs only. | |
| library_type | No | Which library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it. | |
| indexed_chars | No | Characters of the document that were indexed (set); defaults to none reported. | |
| indexed_pages | No | Pages that were indexed (set); PDFs only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many attachments that map holds. | |
| found | No | action:"get": whether Zotero holds extracted text for this attachment. | |
| length | No | Characters stored (action:"set"). | |
| changed | No | action:"since": attachment key to the full-text version it changed at. | |
| content | No | The extracted text itself (action:"get"). | |
| item_key | No | The attachment this call addressed. | |
| totalChars | No | Characters the document holds in total. | |
| totalPages | No | Pages in the document (PDFs). | |
| indexedChars | No | Characters Zotero has indexed of the document. | |
| indexedPages | No | Pages indexed (PDFs). |