Skip to main content
Glama
JingYangYuan

zotero-local-mcp

by JingYangYuan

zotero_get_annotations

Retrieve annotations (highlights and notes) from Zotero items, optionally filtered by item key, with PDF fallback for unrecorded annotations. Returns results as markdown or JSON.

Instructions

Get annotations (highlights and attached notes on PDF/EPUB attachments) for a specific item or across the active Zotero library. item_key: pass the parent item key OR an attachment key — both work; attachment-to-parent resolution is automatic. ALWAYS pass item_key when you know which item you want; calling without it returns every annotation in the library (potentially thousands). use_pdf_extraction=True falls back to direct PDF parsing when the Zotero API has no stored annotation record — useful for annotations made outside Zotero desktop. limit: cap on annotations returned; None (default) returns all. format='markdown' (default) returns a readable list; format='json' returns normalized records with stable keys for downstream scripts and other MCP tools. Uses Better BibTeX when Zotero desktop is running locally, otherwise the Zotero web API. Example: zotero_get_annotations(item_key='ABC12345') → every highlight/note on that paper.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of annotations to return
formatNo``markdown`` for human-readable output or ``json`` for normalized structured records.markdown
item_keyNoOptional Zotero item key/ID to filter annotations by parent item
use_pdf_extractionNoWhether to attempt direct PDF extraction as a fallback

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the tool auto-resolves attachment-to-parent keys, falls back to direct PDF parsing when the API lacks stored records, and uses Better BibTeX locally or the web API otherwise. It also describes output formats and the default return-all behavior, giving agents a complete behavioral picture without contradiction.

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 concise despite its length—every sentence serves a purpose. It front-loads the core purpose, then logically walks through key parameters, then provides a concrete example. No redundancy or filler.

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?

With an output schema present, the description need not enumerate return fields, but it covers all necessary invocation details: scope (specific item or whole library), parameter behavior, fallback logic, format selection, and an example. Nothing an agent needs to call correctly is missing.

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

Parameters5/5

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

Even though schema coverage is 100%, the description adds significant value beyond field names: it clarifies that item_key accepts both parent and attachment keys, explains the limit default (None returns all), details the markdown vs json format trade-offs, and contextualizes use_pdf_extraction as a fallback. These enrich the schema and enable correct parameter choice.

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 clearly states the tool retrieves annotations (highlights and attached notes) for a specific item or across the active library, using a specific verb and resource. It distinguishes from sibling tools like zotero_get_notes (standalone notes vs annotations) and create/update/delete variants by focusing on retrieval.

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?

Explicit guidance is provided: ALWAYS pass item_key when the target is known, with a warning that omitting it returns potentially thousands of annotations. It also explains when to use use_pdf_extraction (fallback for annotations made outside Zotero desktop) and how format selection affects downstream use. This directly informs when and how to invoke the tool versus alternatives.

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