zotero_batch_update_extra
Batch update the Extra field across multiple Zotero items: add, update, or remove key: value lines, including upsert and replace modes.
Instructions
Upsert and/or remove Key: value lines in the Extra field across multiple items in one call — the batch counterpart of zotero_update_item for Extra-field metadata (Better BibTeX citation keys, tex.* fields, CSL variables). item_keys: list of item keys to edit (or a JSON-encoded list string). set_keys: mapping of key→value lines to upsert (or a JSON object string); an existing line with the same key is replaced in place, otherwise the line is appended. remove_keys: list of key names whose lines are deleted. replace: when true, rebuild Extra from set_keys only, dropping every other line (incompatible with remove_keys). Keys are matched by their key: prefix, case-insensitively; free-form lines without a colon are preserved. Items needing no change, attachments/notes/annotations, and unknown keys are skipped (counted in the summary). Requires a writable library (web API key or hybrid mode) — fails in local-only mode. Example: zotero_batch_update_extra(item_keys=['ABCD1234', 'EFGH5678'], set_keys={'tex.otscore': '2'}, remove_keys=['tex.draft']).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_keys | No | Item keys to edit (list or JSON-encoded list string) | |
| set_keys | No | Mapping of key→value lines to upsert (dict or JSON object string) | |
| remove_keys | No | Key names whose lines are deleted (list or JSON string) | |
| replace | No | When true, rebuild Extra from set_keys only |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |