Skip to main content
Glama
Code Mode for Zotero

Code Mode for Zotero

by ltalignani

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZOTERO_BBT_DBNoPath to better-bibtex.sqlite. Defaults to the location next to zotero.sqlite.
ZOTERO_RAG_DBNoPath to the passage index.~/.local/share/code-mode-for-zotero/rag.sqlite
ZOTERO_DB_PATHNoPath to zotero.sqlite. Found automatically if not set.
ZOTERO_MCP_LIBRARYNoWhich library to search: `all`, `0` (personal library) or a group id. Default is `all`.all
ZOTERO_MCP_SANDBOXNo`relaxed` runs scripts without full isolation. Default is `strict`.strict
ZOTERO_RAG_EMBED_KEYNoBearer token, if the embeddings endpoint needs one.
ZOTERO_RAG_EMBED_URLNoOpenAI-compatible embeddings endpoint, e.g. `http://localhost:1234/v1`. If unset, passage search works on keywords only.
ZOTERO_RAG_EMBED_MODELNoEmbedding model name. Default is `nomic-embed-text`.nomic-embed-text

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Read-only access to the user's Zotero library through Python. Call search_api once to see the available functions, then use execute. Do the filtering and summarising in the program: only what it prints returns to you.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_apiA

List the functions available inside execute(), with signatures and the fields of the records they return. Give a word to narrow the list; leave it empty for everything.

executeA

Run Python that reads the user's Zotero library. A global zotero offers search(), get_item(), fulltext(), find() and passages() (meaning-based search over the PDF text, with page numbers; see search_api for details); results are plain dicts and lists. Only what you print(), or a final bare expression, is returned, so filter and summarise in code instead of printing everything. Read-only; no network or file access.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools occupy clearly separate roles: search_api is pure introspection/documentation of the execute() surface, while execute runs code. There is no plausible way to confuse them, and the description of execute explicitly points at search_api for detail.

Naming Consistency4/5

Both names are lowercase snake_case, but search_api follows a verb_noun pattern while execute is a bare verb. Minor deviation rather than a conflict, and both remain readable and predictable.

Tool Count4/5

A code-mode server deliberately needs only an introspection tool and an execution tool, so the count is well-matched to the design rather than thin. A third convenience tool (e.g. a schema/help shortcut) is not needed but the 2-tool surface sits at the low end.

Completeness3/5

For read-only research workflows the surface is workable: search, get_item, fulltext, find, and passages cover discovery and retrieval. However, there are no write operations (adding items, notes, tags, collections) and no explicit collection/tag listing or export, so Zotero library management is only half-covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues