Skip to main content
Glama

Zotero Search Items

zotero_search_items

Search Zotero library items by title, author, or year using short substring queries. Returns metadata and abstracts, falling back to simplified or semantic search if no matches.

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 the SQLite backend (the default in local mode); 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.5/5.0
Behavior4/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. It discloses the fallback cascade (auto-fallback to simplified queries then semantic search), the exclusion of attachments by default, and the requirement for SQLite backend for search_all_libraries. These are important behavioral traits beyond the schema, though it does not state return format details (mitigated by output schema) or any rate limits.

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

Conciseness3/5

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

The description is detailed but a bit long, mixing essential usage guidance with less critical parameter details. The most critical guidance (short queries, fallback behavior) is front-loaded, but the length might dilute attention. It could be tightened by moving example calls and some parameter clarifications to a separate 'examples' section.

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?

For a tool with 8 parameters and only 1 required, the description covers all key aspects: query format, qmode, item_type, tag, limit, collection scoping, subcollections, and multi-library search. The output schema exists, so return values need no elaboration. It also provides two examples and clear caveats about backend requirements.

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 baseline is 3. The description adds significant value by explaining the meaning of 'everything' mode and clarifying that collection_key bypasses the fallback cascade, and that search_all_libraries labels results. It also warns against combining search_all_libraries with collection_key, which enriches the schema's descriptions.

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 searches Zotero items by substring match against metadata, and it explicitly differentiates from siblings like zotero_semantic_search and zotero_search_by_tag. The verb 'search' plus the resource 'items' and the matching mode are specific, making the purpose unmistakable.

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 gives explicit guidance on when to use this tool vs alternatives: use it for short author-year queries, and directs to zotero_semantic_search for topic discovery and zotero_search_by_tag for tags. It also advises keeping queries simple, which is a crucial usage rule.

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