Skip to main content
Glama
JingYangYuan

zotero-local-mcp

by JingYangYuan

zotero_add_item

Add references to Zotero from DOI, URL, ISBN, BibTeX, CSL JSON, or local files with options for collections, tags, and duplicate handling.

Instructions

Add item(s) to Zotero from any source: DOI, URL, ISBN, BibTeX, CSL JSON, or a local file. Use for every 'add this to Zotero' request. source: the identifier, URL, citation text, or ABSOLUTE file path. DOI/URL/ISBN also take many at once (list or comma/newline-separated), each resolved independently. BibTeX/CSL JSON may be inline (many entries per call) or a path to .bib/.bibtex/.json/.csljson; documents are .pdf, .epub, .docx and similar. source_type: 'auto' (default) detects it, incl. comma/newline DOI lists; override for URL/ISBN batches. Routing: doi → CrossRef (best metadata — prefer a DOI when you have one); url → doi.org/arxiv.org get full metadata, anything else becomes a bare 'webpage' item that is often not citable, so resolve to a DOI first; isbn → Open Library then Google Books (noisy — verify after); bibtex/csl_json → one item per entry, citation key kept in Extra; file → extracts the PDF's DOI and enriches via CrossRef, else guesses from filename/text, then attaches the file. collections: keys, names, or '/'-paths ('_project/topic'), validated before anything is created — an unknown or ambiguous spec fails the call rather than leaving an unfiled item; create_missing_collections=True creates them instead. if_exists: 'duplicate' (default) always creates; 'file' is idempotent — reuses the item matching the DOI/ISBN/URL, adding missing collections/tags, never removing; 'skip' leaves a match untouched. attach_mode: 'auto' (default) attaches an OA PDF, 'linked_url' bookmarks it, 'none' skips, 'required' fails without one. title: file sources only, when extraction misses. Requires local Zotero write authorization. Attached files are copied into local Zotero storage; subsequent syncing is determined by Zotero desktop settings. Run Example: zotero_add_item(source='10.1145/3708319', collections=['9SU943GB'], if_exists='file').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
titleNo
sourceYes
if_existsNoduplicate
attach_modeNoauto
collectionsNo
source_typeNoauto
create_missing_collectionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it delivers extensively: it discloses write authorization requirements, file copying into local storage, validation failures for ambiguous collections, idempotency semantics for if_exists='file', and the caveat that URL-derived items may be bare webpages. No contradiction exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence adds functional value. It is front-loaded with the purpose, then systematically covers routing, collections, existence handling, attachment modes, and file specifics. No redundancy or fluff; each clause clarifies a decision the agent must make.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, multiple input types, conditional behaviors) and the presence of an output schema, the description covers all necessary operational details: source formats, collection validation, idempotency, attachment modes, and auth requirements. The only omission, tags, is minor and does not hinder correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It thoroughly explains source, source_type, collections, create_missing_collections, if_exists, attach_mode, and title. The only gap is the 'tags' parameter, which is never mentioned; while its purpose is fairly obvious, the description omits it entirely, a minor but real gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Add item(s) to Zotero from any source' and enumerates supported input types (DOI, URL, ISBN, BibTeX, CSL JSON, local file). It clearly distinguishes this from sibling tools by framing it as the universal add operation and even tells the agent to use it for every 'add this to Zotero' request.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use for every add this to Zotero request' and provides detailed routing guidance for each source type, including when to prefer a DOI over a URL and when to resolve to a DOI first. It also explains conditional behaviors like if_exists and create_missing_collections, giving the agent clear decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.