Skip to main content
Glama
JingYangYuan

zotero-local-mcp

by JingYangYuan

zotero_search_items

Search Zotero items with short substring queries on title, authors, year, or abstract, and filter by type, tag, collection, or library to retrieve matching metadata.

Instructions

Search Zotero items by substring match against metadata (title, creators, year, and — in 'everything' mode — abstract). Returns metadata + abstracts as markdown. IMPORTANT: keep queries SHORT and SIMPLE — 'Author Year' (e.g. 'Brewer 2011') or just an author name ('Cladder-Micus'). This is substring matching, not web search: each extra word NARROWS the match, so adding topic words usually returns fewer results, not more. For topic discovery, use zotero_semantic_search instead; for tag filtering use zotero_search_by_tag. If a query finds nothing, this tool automatically falls back to simplified queries and then semantic search. query: required substring. qmode: 'titleCreatorYear' (default) matches only title/authors/year; 'everything' also searches abstract. item_type: '-attachment' (default) excludes attachments; pass 'journalArticle', 'book', etc. to filter. tag: optional list of tag conditions (ANDed). limit: max results (default 10). collection_key: 8-char key to restrict to a collection (bypasses the fallback cascade). include_subcollections: also search collections nested beneath it (default False). search_all_libraries: search personal + all group libraries at once, labelling each result with its library — use it when you don't know which library holds the item. Needs ZOTERO_SEARCH_BACKEND=sqlite; excludes collection_key. Example: zotero_search_items(query='Cladder-Micus') or zotero_search_items(query='Brewer 2011', search_all_libraries=True).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoTag filter. Accepts ["tagA", "tagB"] (preferred), a bare string "tagA", a JSON-string list '["tagA", "tagB"]', or the dict-shape [{"tag": "tagA"}] sometimes emitted by clients that confuse the filter form with Zotero's stored-tag form. All are normalized internally to the list[str] form pyzotero expects.
limitNoMaximum number of results to return
qmodeNoQuery mode (titleCreatorYear or everything)titleCreatorYear
queryYesSearch query string
item_typeNoType of items to search for. Use "-attachment" to exclude attachments.-attachment
collection_keyNoOptional collection key to scope the search to a specific collection. When provided, bypasses the fallback cascade and searches the collection directly.
search_all_librariesNoSearch every accessible library at once instead of the active one (#163). Requires the SQLite backend; each result is labelled with the library it came from. Cannot be combined with collection_key, which names a collection inside one library.
include_subcollectionsNoAlso search collections nested beneath collection_key. Ignored when collection_key is not given. Defaults to False, matching Zotero's own "Search subcollections" checkbox.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/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 burden — and it discloses the most surprising behaviors: the automatic fallback to simplified queries and then semantic search, the counterintuitive narrowing of results as words are added, the ZOTERO_SEARCH_BACKEND=sqlite environment prerequisite, and per-library labelling of results. This is unusually rich behavioral disclosure for a search tool.

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

Conciseness4/5

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

The description is long but front-loaded: core behavior, the IMPORTANT short-query warning, sibling routing, and the fallback cascade all appear before the parameter glossary. Nearly every sentence earns its place, with only minor redundancy (the fallback cascade is mentioned twice) and a parameter list that partly restates an already-rich schema.

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

Completeness4/5

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

For an 8-parameter tool with a fallback cascade, a backend prerequisite, and 36 siblings, the description is remarkably complete: it covers fallback behavior, parameter exclusions (collection_key vs search_all_libraries), subcollection semantics, and the closest sibling alternatives. Minor gaps remain — zotero_advanced_search is never mentioned as an alternative, and sorting/pagination are left to the output schema — but nothing an agent needs to call it correctly is missing.

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 100%, so the 3 baseline applies, but the description adds meaning the schema lacks: what qmode values actually match ('everything' also searches abstract), that item_type '-attachment' excludes attachments, that tag conditions are ANDed, that collection_key is an 8-char key, and that search_all_libraries requires the sqlite backend. The schema already explains most parameters well, so this is meaningful enrichment rather than rescue.

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 — 'Search Zotero items by substring match against metadata' — and specifies the target fields (title, creators, year, abstract) and return format (metadata + abstracts as markdown). It also explicitly names sibling tools it is not ('For topic discovery, use zotero_semantic_search instead; for tag filtering use zotero_search_by_tag'), making the tool's identity unambiguous among 36 siblings.

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?

It gives explicit when-to-use guidance: keep queries SHORT and SIMPLE, use 'Author Year' (e.g. 'Brewer 2011') or a bare author name, because substring matching narrows with each added word. It names alternatives with their selection conditions and provides situation-specific advice such as 'use it when you don't know which library holds the item' for search_all_libraries and 'bypasses the fallback cascade' for collection_key.

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