Zotero attachments (files)
zotero_attachmentUpload, download, or inspect attachment files in Zotero: fetch from URL or local disk, save to a chosen path, or return item metadata.
Instructions
Upload, download, or inspect attachment files. action: "upload" stores a file as a Zotero attachment using the full File Storage protocol (provide url to have Zoteus fetch it, or file_path for a file on the machine running Zoteus; optional parent_item to attach it under an item, title, content_type) and returns the new attachment key; "download" fetches an attachment's file to a local path (provide item_key; optional save_path, default under the Zoteus data dir) and returns the path and byte count; "info" returns an attachment item's metadata. File bytes are written to / read from disk, never streamed through the conversation. Upload/download use the cloud Web API and your file-storage quota. When Zoteus runs on a different machine than Zotero, file_path refers to the server's disk, so use url instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to download and upload instead of `file_path`; works on remote/hosted servers. | |
| title | No | ||
| action | Yes | ||
| item_key | No | Attachment item key (download/info). | |
| file_path | No | File to upload, on the machine running Zoteus. | |
| overwrite | No | Allow `save_path` to replace a file that already exists (default false). | |
| save_path | No | Where to write the downloaded file. | |
| library_id | No | ||
| parent_item | No | Parent item key to attach under (upload). | |
| content_type | No | ||
| library_type | No |