Zotero Switch Library
zotero_switch_librarySwitch the active Zotero library so every later read or write targets that collection, item, annotation, or search context. Verify accessible library IDs first to avoid failed calls.
Instructions
Switch the active library context. EVERY subsequent read/write tool call (collections, items, annotations, search — all of them) operates on the library set here. Changes persist for the rest of the session or until the next switch. Discover valid library IDs/types via zotero_list_libraries first; don't guess. library_id: library ID string as returned by zotero_list_libraries (numeric for user/group, numeric for feeds); for the personal library 'user' or '0' also work. library_type: 'user' — the personal library; 'group' (default) — a group library; 'feeds' — a local RSS feed library; 'default' — RESET to whatever the ZOTERO_LIBRARY_ID / ZOTERO_LIBRARY_TYPE env vars configure (library_id is ignored in this mode). Fails fast if the library_id isn't accessible under the current credentials. Example: zotero_switch_library(library_id='5294983', library_type='group') or zotero_switch_library(library_id='', library_type='default').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| library_id | Yes | The library/group ID to switch to. For user library: "0" or "user"; in local mode also the libraryID zotero_list_libraries shows; in web mode your user ID. For group libraries: the groupID (e.g. "6069773"). | |
| library_type | No | "user", "group", or "default" to reset to env var defaults. | group |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |