Skip to main content
Glama

Zotero Semantic Search

zotero_semantic_search

Find Zotero papers by meaning, not just keywords. Runs AI embedding search on a topic query and returns the most similar items, simplifying literature discovery.

Instructions

Prioritized topic-search tool. Find papers by semantic similarity to a query using AI embeddings — the BEST tool for finding papers on a topic (e.g. 'papers about mindfulness-based therapy'), far more efficient than scanning collection items or reading abstracts. Searches the ACTIVE library by default; pass search_all_libraries=True to cover every indexed library. query: the topic or concept; natural-language phrases work well. limit: max results (default 10). filters: optional ChromaDB metadata filter, one key per dict (e.g. {'item_type': 'journalArticle'}); also accepts a JSON string. Keys: item_type, item_key, citation_key, doi, publication, tags, has_fulltext. Combine keys with {'$and': [{...}, {...}]}. There is no year filter: 'date' holds the raw Zotero date string. library_id: optional — scope to one library other than the active one: 0 or 'user' for personal, else a groupID (see zotero_list_libraries). search_all_libraries: search every indexed library at once, labelling each result with its library; needs the SQLite backend (the default in local mode), excludes library_id. Requires the semantic search database to be POPULATED — run zotero_update_search_database first if you just installed the server or added new items; check readiness with zotero_get_search_database_status. Available only when the [semantic] optional dependency is installed. Example: zotero_semantic_search(query='mindfulness-based cognitive therapy for depression', limit=5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)
queryYesSearch query text - can be concepts, topics, or natural language descriptions
filtersNoOptional metadata filters as dict or JSON string. Example: {"item_type": "note"}
library_idNoOptional library scope — 0/"user" for the personal library or a groupID for a group library. Defaults to the active library.
search_all_librariesNoSearch every indexed library at once (#163). Requires the SQLite backend; results are labelled with their source library. Mutually exclusive with library_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it is unusually transparent: it discloses the active-library default, the SQLite backend requirement for search_all_libraries, the mutual exclusivity of search_all_libraries with library_id, the absence of a year filter, and the requirement that the semantic database be populated. It also notes the optional dependency and that cross-library results are labelled with their source library.

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 front-loaded with purpose and usage; parameter details are organized in a scannable, name-by-name pattern, and the example illustrates usage concisely. It is long, but the length is justified by five parameters, numerous preconditions, and integration caveats. Every sentence contributes actionable information.

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?

All parameters are documented in both schema and description, an output schema exists to cover return values, and the prerequisite, dependency, and deployment constraints are explicitly stated. An agent has everything needed to decide whether semantic search is appropriate and how to call it correctly.

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?

The schema already covers all 5 parameters at 100%, but the description adds substantial meaning beyond the schema: natural-language query phrasing, filters as ChromaDB metadata with one-key-per-dict and accepted keys, $and composition, library_id as 0/'user' vs groupID with a pointer to zotero_list_libraries, and search_all_libraries backend caveats. This goes well beyond the baseline 3 for fully covered schemas.

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?

Opens by naming itself a 'Prioritized topic-search tool' and immediately defines its mechanism: semantic similarity to a query using AI embeddings. This clearly distinguishes it from sibling lookup/search tools, which use metadata, tags, or fulltext rather than conceptual similarity. The concrete example for mindfulness-based therapy also reinforces the purpose.

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

Usage Guidelines4/5

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

States it is the 'BEST tool for finding papers on a topic' and gives natural-language query examples, which tells an agent when to invoke it. It also instructs users to run zotero_update_search_database first if the database isn't populated. It does not explicitly name alternative search tools for keyword/exact-match cases, so it stops short of full when-not-to-use guidance.

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