Skip to main content
Glama

Zotero Switch Library

zotero_switch_library

Switch the active Zotero library so every later read or write targets that collection, item, annotation, or search context. Verify accessible library IDs first to avoid failed calls.

Instructions

Switch the active library context. EVERY subsequent read/write tool call (collections, items, annotations, search — all of them) operates on the library set here. Changes persist for the rest of the session or until the next switch. Discover valid library IDs/types via zotero_list_libraries first; don't guess. library_id: library ID string as returned by zotero_list_libraries (numeric for user/group, numeric for feeds); for the personal library 'user' or '0' also work. library_type: 'user' — the personal library; 'group' (default) — a group library; 'feeds' — a local RSS feed library; 'default' — RESET to whatever the ZOTERO_LIBRARY_ID / ZOTERO_LIBRARY_TYPE env vars configure (library_id is ignored in this mode). Fails fast if the library_id isn't accessible under the current credentials. Example: zotero_switch_library(library_id='5294983', library_type='group') or zotero_switch_library(library_id='', library_type='default').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
library_idYesThe library/group ID to switch to. For user library: "0" or "user"; in local mode also the libraryID zotero_list_libraries shows; in web mode your user ID. For group libraries: the groupID (e.g. "6069773").
library_typeNo"user", "group", or "default" to reset to env var defaults.group

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, the description carries the full burden and does so: it discloses session-wide persistence, fail-fast behavior on inaccessible IDs, and that 'default' resets to ZOTERO_LIBRARY_ID/ZOTERO_LIBRARY_TYPE env vars while ignoring library_id. It also warns that all subsequent calls are affected, which is the key behavioral trait an agent must know.

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?

It is dense but front-loads the critical session-wide effect before the per-parameter details, and every sentence adds operational information. It is somewhat long and partially restates schema text, which keeps it from a 5.

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?

An output schema exists, so return-format detail is unnecessary. For a stateful switch with session-wide consequences, the description covers persistence, reset behavior, ID discovery, failure mode, and per-mode ID semantics, leaving no significant gap for an agent.

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 baseline is 3, but the description adds real value: valid ID forms per mode (numeric for user/group/feeds, 'user' or '0' for personal), the meaning of each library_type value, and the fact that library_id is ignored in 'default' mode. This goes beyond the schema's terse parameter docs.

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 states a specific verb ('Switch') and resource ('the active library context') and immediately clarifies the sweeping side effect: every subsequent read/write tool operates on this library. This distinguishes it cleanly from siblings like zotero_list_libraries, which is named as the discovery prerequisite.

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 precedence: call zotero_list_libraries first, don't guess IDs, and it explains that the setting persists for the session or until the next switch. The named alternative (zotero_list_libraries for discovery) and the reset condition make the when-to-use guidance unambiguous.

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