add_items_by_doi
Resolve DOIs and add the matching items to a Zotero library with automatic metadata, correct item types, and optional open-access PDF attachment.
Instructions
Add items to your Zotero library by resolving DOIs. Works with ANY item type that has a DOI — journal articles, books, datasets, preprints, conference papers, reports, etc. For each DOI, resolves metadata via content negotiation and creates the item in Zotero with the correct type automatically. Returns a list of successfully added items (with item_key and title) and any failures.
WHEN TO USE vs add_items:
Use add_items_by_doi when the item HAS a DOI — it auto-resolves all metadata and attaches open-access PDFs (when the server has UNPAYWALL_EMAIL set).
Use add_items when the item does NOT have a DOI, or when you need to override specific metadata fields (add_items_by_doi does not allow metadata overrides).
Mixed batch: if some items have DOIs and others don't, make two separate calls — add_items_by_doi for the DOIs and add_items for the rest.
WORKFLOW TIPS:
To collect metadata for all added items, call get_items_details with the returned item_keys (single batch call).
To create a cited Word document, use the returned item_keys as placeholders in a .docx, then call inject_citations. See inject_citations description for the full workflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dois | Yes | Array of bare DOIs (e.g. ["10.1038/s41586-023-06647-8"], without "https://doi.org/"). Each DOI will be resolved and added to Zotero. | |
| tags | No | Tags to apply to all added items | |
| library_id | No | Numeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library. | |
| library_type | No | Library for this call: 'user' (personal) or 'group'. Default: the library configured on the server. | |
| collection_key | No | Zotero collection key to add items to. Get this from create_collection or get_collections. | |
| auto_attach_pdf | No | Attach open-access PDFs found via Unpaywall (default: true; needs UNPAYWALL_EMAIL in the server settings, uses the user's Zotero file storage). Leave enabled unless the user does not want PDFs or attachment is causing errors. |