Get attachment full text / passages / outline (read-only)
zotero_get_fulltextGet full text from Zotero PDFs/EPUBs to verify claims with page numbers. Use queries to find relevant passages, extract page ranges, or retrieve the outline.
Instructions
Retrieve an item's PDF or EPUB text for grounding. Pass a parent item_key (its best PDF/EPUB attachment is resolved automatically) or an attachment key. With query, returns the top relevant passages with locators (char offsets, nearest section, and a page); with page_range (e.g. "3-7"), returns just those pages, re-extracted from the PDF so the span is exact; with outline:true, returns the PDF's table of contents with page numbers (the cheapest way to decide which pages to read next); with none of them, returns a truncated head. Text comes from Zotero's full-text index when available; when the attachment is NOT indexed yet, the file itself is read and parsed on the fly (fallback, on by default; set fallback:false to disable), so a PDF added minutes ago still returns text (marked fulltextSource:"pdf" or "epub", with fileSource saying where the bytes came from). The file is read from the running Zotero desktop app, else straight out of the local Zotero storage folder, else downloaded from Zotero cloud storage. Page numbers are exact whenever the PDF was parsed, and otherwise an estimate (pageApprox) unless precise_pages:true. Read-only; the indexed text is served by the running Zotero desktop app when there is one, otherwise by the cloud Web API. Use this to cite a claim with a page after finding an item via zotero_search_items / zotero_semantic_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Return top passages relevant to this query. | |
| outline | No | Return the PDF's table of contents (heading, page, nesting level) instead of text. | |
| fallback | No | When Zotero has no indexed full text for the attachment, read the file itself and extract it directly (default true). | |
| item_key | Yes | Parent item key or attachment key. | |
| max_chars | No | Best-effort cap on total returned text (default 12000); a single passage is never split, so one passage may slightly exceed it. | |
| library_id | No | ||
| page_range | No | Page span like "3-7" (1-based, inclusive). PDFs only. | |
| library_type | No | ||
| max_passages | No | Max passages (default 5). | |
| precise_pages | No | Re-extract the PDF for exact page numbers (already the default with `page_range`). |