Zotero Attach File
zotero_attach_fileAttach a file to an existing Zotero item from a local path or direct PDF URL, choosing import (upload a copy) or linked mode. Skips duplicates and returns the attachment key.
Instructions
Attach a file to an EXISTING regular item (not an attachment or note). To create a new item from a file, use zotero_add_item(source=). Give exactly one of file_path (absolute; any regular file, no symlinks or .lnk) or url (a direct PDF link, downloaded by the server). filename: overrides the stored name. link_mode: 'import' (default) uploads a copy, which counts against Zotero storage unless WebDAV is set up; 'linked' links the file where it is (file_path only, nothing copied). Skips the upload when the item already has the same file. Returns the attachment key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"item_key": "<item_key>"
},
"name": "zotero_attach_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| filename | No | ||
| item_key | Yes | ||
| file_path | No | ||
| link_mode | No | import |