Manage Zotero collections
zotero_manage_collectionsList, create, rename, reparent, or delete Zotero collections, and add or remove items from them. Manage collection structure and membership via action parameters.
Instructions
List, create, rename, reparent, or delete collections, and move items into or out of a collection. Set action to one of: "list" (collections with key/name/parent, sorted by name; q filters by name over the whole library, start/limit page, totalResults counts them all), "create" (needs name, optional parent_collection key; omit it for top-level), "rename" (needs collection_key + name), "reparent" (needs collection_key; parent_collection key, or omit to move to top level), "delete" (needs collection_key), "add_items" / "remove_items" (need collection_key + item_keys; collection membership lives on each item). All actions except "list" write to the cloud Web API. When the server sets a bulk-write threshold (ZOTEUS_CONFIRM_BULK_WRITES, off by default), removing more items than that from a collection in one call also needs confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Only collections whose name contains this text (case-insensitive), searched over the whole library, not one page. Use it to find a collection by name. | |
| name | No | Collection name (create/rename). | |
| limit | No | Collections to return (default 200, at most 1000). | |
| start | No | Zero-based offset into the listing, for paging (default 0). Page with start += limit while `totalResults` is larger. | |
| action | Yes | What to do. "list" reads every collection (then `q`, `start`, `limit` apply); "create" needs `name`; "rename" needs `collection_key` + `name`; "reparent" needs `collection_key`; "delete" needs `collection_key`; "add_items"/"remove_items" need `collection_key` + `item_keys`. | |
| confirm | No | Required to remove more items in one call than the server's bulk-write threshold. | |
| item_keys | No | Item keys (add_items/remove_items). | |
| 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. | |
| 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. | |
| collection_key | No | Target collection key (all actions except list/create). | |
| parent_collection | No | Parent collection key; omit for top-level. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | The offset this page starts at. | |
| failed | No | One entry per object the write could not land; absent or empty when all of them did. | |
| created | No | Key of the collection created (action:"create"). | |
| deleted | No | Key of the collection deleted. | |
| updated | No | Item keys added to or removed from the collection. | |
| complete | No | False when the library holds more collections than Zoteus reads in one listing (10,000); the page then comes from those read. | |
| collections | No | This page of the collections, sorted by name (action:"list"). | |
| totalResults | No | Collections matching in total (every collection when there is no `q`), not just this page. Page with start/limit while it is larger. | |
| collection_key | No | The collection renamed or reparented. | |
| libraryVersion | No | The library's Last-Modified-Version after this write. |