zotero_add_from_file
Add a local PDF or EPUB to Zotero. Extracts DOI or metadata from the file to create a complete citation.
Instructions
Add an item to the active Zotero library from a LOCAL .pdf or .epub file. Attempts to extract the DOI from the file content; if found, enriches metadata via CrossRef (title, creators, journal, year, abstract). If no DOI is found, falls back to best-effort title/author guesses from the filename or document text. Use this when the user has a file on disk but no DOI/URL handy. If you have a DOI use zotero_add_by_doi; for an online URL use zotero_add_by_url. file_path: ABSOLUTE path to a .pdf or .epub file (relative paths fail). Other extensions are rejected. title: optional override if metadata extraction misses. collections: optional list of 8-char keys/names to file under. tags: optional list of tag strings. Requires a writable library (fails in local-only mode). PDF uploads may hit the 300MB Zotero cloud free-tier quota — metadata still lands. Run zotero_update_search_database afterwards for semantic search. Example: zotero_add_from_file(file_path='/Users/me/paper.pdf', collections=['9SU943GB']).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| title | No | ||
| item_type | No | document | |
| collections | No | ||
| tags | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |