zotero_merge_duplicates
Merge duplicate Zotero items into a keeper, consolidating tags, collections, notes, and annotations, then move duplicates to trash. Run dry-run first to verify; pass confirm=True to execute.
Instructions
Merge one or more duplicate items INTO a keeper: consolidates tags, collections, notes, annotations, and all child items onto the keeper, then moves the duplicates to Trash (recoverable from Zotero desktop's Trash view). SAFETY: dry-run by DEFAULT — prints what would happen without changing anything. Pass confirm=True to actually execute. Always run dry-first at least once to verify the keeper choice. Discover groups first with zotero_find_duplicates. keeper_key: 8-character key of the item to KEEP. All metadata gaps on the keeper are filled from duplicates where possible; conflicting fields keep the keeper's value. duplicate_keys: ARRAY of 8-character item keys to merge into the keeper and trash (also accepts a JSON-encoded list string) — pass as an array, not a single concatenated string. The keeper itself must NOT appear in this list. confirm: False (default) runs dry; True executes the merge. Requires a writable library (web API key or hybrid mode); fails in local-only mode. Example dry-run: zotero_merge_duplicates(keeper_key='ABC12345', duplicate_keys=['XYZ98765']). Example execute: same, plus confirm=True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keeper_key | Yes | ||
| duplicate_keys | Yes | ||
| confirm | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |