Trash or restore Zotero items
zotero_trash_itemsMove items to the trash (the safe, REVERSIBLE default) or restore them. This sets the deleted flag (1=trash, 0=restore); it is NOT a permanent delete, so trashed items can be recovered here or in the Zotero app.
Instructions
Move items to the trash (the safe, REVERSIBLE default) or restore them. This sets the deleted flag (1=trash, 0=restore); it is NOT a permanent delete, so trashed items can be recovered here or in the Zotero app. Use this instead of zotero_delete_items unless you truly need irreversible removal. Provide item_keys and optional action (default "trash"). Writes go to the running Zotero desktop app (its local-API writes, Zotero 10+) for your personal library and for any group library the app holds, otherwise to the cloud Web API. When the server sets a bulk-write threshold (ZOTEUS_CONFIRM_BULK_WRITES, off by default), trashing more items than that in one call also needs confirm: true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"item_keys": "<item_keys>"
},
"name": "zotero_trash_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Default "trash". | |
| confirm | No | Required to trash more items in one call than the server's bulk-write threshold. | |
| item_keys | Yes | Item keys to trash or restore. | |
| 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. |
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. | |
| target | No | Where the write went: "local" (Zotero desktop local API), "desktop" (connector protocol) or "cloud" (Zotero Web API). | |
| updated | Yes | Keys of the items trashed or restored. | |
| libraryVersion | No | The library's Last-Modified-Version after this write. |