Attach a file (PDF, snapshot) to an item
zotero_attach_fileAttach a file (via local path or URL) to an existing Zotero item and return the new attachment key.
Instructions
Add a stored file attachment (e.g. a PDF full text) under an existing item. Give parent (the item key) and either path (a local file the Zoteus process can read) or url (downloaded first). filename and content_type are inferred when omitted. Runs against the Zotero desktop app’s local API (Zotero 10+; you may be asked once to allow Zoteus write access — choose "Always Allow"). Returns the new attachment key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to download the file from. | |
| path | No | Local filesystem path to the file. | |
| title | No | Attachment title, e.g. "Full Text PDF". | |
| parent | Yes | Key of the parent item to attach the file to. | |
| filename | No | File name to store; inferred from path/url if omitted. | |
| content_type | No | MIME type; inferred from the extension if omitted (pdf -> application/pdf). |