## Implement: biblio zotero pull — read items + PDFs from Zotero via API Phase
Implement: biblio zotero pull — read items + PDFs from Zotero via API¶
Phase 2 of the pool ecosystem spec (docs/specs/biblio/pool-ecosystem.md).
What¶
Add biblio zotero pull command and MCP tool that pulls items and PDFs from a Zotero library (personal or group) into a biblio workspace (project or pool).
Dependencies¶
- pyzotero as optional dependency:
pip install "biblio-tools[zotero]" - Zotero API key configured in
biblio.ymlor env var
Behavior¶
# Pull a collection into personal pool
biblio zotero pull --collection "Oscillations" --target pool
# Pull from group library into lab pool
biblio zotero pull --group 67890 --collection "Core" --target lab-pool
# Pull everything new since last sync
biblio zotero pull --incremental
Implementation¶
- Zotero client wrapper —
packages/biblio/src/biblio/zotero_sync.py - Thin wrapper around pyzotero
pull_collection(collection_name, target_root)→ list of pulled itemspull_items(item_keys, target_root)→ download metadata + attachments- Map Zotero item types → BibTeX entry types (use zotero-schema as reference)
- Download PDF attachments →
bib/articles/{citekey}/{citekey}.pdf -
Write pulled items as BibTeX →
bib/srcbib/zotero-{collection}.bib -
Incremental sync —
packages/biblio/src/biblio/zotero_state.py - Track last sync version per collection in
.projio/biblio/zotero-sync.yml - Use Zotero's
sinceparameter to only fetch changed items -
Store item version map for conflict detection
-
Config — add to
biblio.yml:zotero: api_key_env: ZOTERO_API_KEY library_type: user # user | group library_id: "12345" sync_target: pool # pool | local -
MCP tool:
def biblio_zotero_pull( collection: str = "", group_id: str = "", incremental: bool = True, target: str = "pool", # "pool" | "local" ) -> dict # {"pulled": N, "skipped": N, "errors": [...]} -
CLI:
biblio zotero pull [--collection NAME] [--group ID] [--target pool|local]
Key references (indexed in RAG)¶
.projio/codio/mirrors/urschrei--pyzotero/— pyzotero API surface.projio/codio/mirrors/zotero--zotero-schema/— Zotero data model, item type mapping.projio/codio/mirrors/zotero--translators/— how Zotero generates BibTeX (for field mapping)packages/biblio/src/biblio/ingest.py— existing ingest pipeline to followpackages/biblio/src/biblio/pool.py— pool write patterns
Related Notes¶
- issue-arash-20260403-201609-055675.md — Direct prerequisite: the Zotero integration model spec that this implementation task is based on
- issue-arash-20260403-205942-590539.md — Sibling task in the pool ecosystem spec — pool promote complements zotero pull
- issue-arash-20260402-220025-468258.md — Defines bib architecture (srcbib/, articles/) that zotero pull writes into
- issue-arash-20260403-193112-105596.md — Enrichment pipeline redesign — pulled Zotero items feed into the enrichment pipeline
- issue-arash-20260402-015659-415628.md — Batch docling command processes PDFs that zotero pull will download