Manage Zotero collections
zotero_manage_collectionsManage Zotero collections by listing, creating, renaming, reparenting, deleting, or moving items in and out. Choose an action to organize your library structure.
Instructions
List, create, rename, reparent, or delete collections, and move items into or out of a collection. Set action to one of: "list" (all collections with key/name/parent), "create" (needs name, optional parent_collection key — omit 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 |
|---|---|---|---|
| name | No | Collection name (create/rename). | |
| action | Yes | What to do. "list" reads every collection; "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 |
|---|---|---|---|
| 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. | |
| collections | No | Every collection in the library (action:"list"). | |
| collection_key | No | The collection renamed or reparented. | |
| libraryVersion | No | The library's Last-Modified-Version after this write. |