Skip to main content
Glama

Zotero Switch Library

zotero_switch_library

Switch the active Zotero library to direct all subsequent read/write operations to a specific user, group, or RSS feed library. Use first to set context; supports reset to defaults.

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). 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" (local mode) or your user ID (web mode). 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

A5/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 of behavioral disclosure. It does so thoroughly: changes persist for the session, 'default' resets to env-var configuration, library_id is ignored in that mode, and it 'Fails fast if the library_id isn't accessible under the current credentials.' This goes well beyond a bare 'switch' statement and gives the agent clear expectations for side effects, failure, and reset behavior.

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 long but every sentence earns its place. It front-loads the core state-changing behavior, then persistence, then discovery guidance, then param semantics, then fail-fast behavior, and ends with examples. There is no filler or repetition; the density is high and each piece is needed for correct invocation.

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?

The description is complete for a session-state tool: it covers the state transition, persistence, all parameter modes, reset behavior, credential checks, and how to look up valid values. An output schema exists, so return values don't need to be explained. There is nothing an agent needs to know to call this tool correctly and safely that is missing.

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?

Although schema coverage is 100%, the description adds substantial semantic value beyond the schema. For library_type, it explains each value in plain language and adds 'feeds' — a value not present in the schema description — with its meaning. It also clarifies that library_id is ignored in 'default' mode and gives concrete examples for both parameters, which the schema does not provide. This is a model of parameter enrichment.

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: 'Switch the active library context.' It then explicitly defines the scope of that switch — 'EVERY subsequent read/write tool call ... operates on the library set here' — leaving no ambiguity about what the tool does. It is the only switching tool among siblings, and this definition clearly differentiates it from the read/write tools that operate within that context.

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 when-to-use guidance: switch before any other library-scoped calls, and persist for the session. It also instructs to 'Discover valid library IDs/types via zotero_list_libraries first; don't guess,' and documents the reset behavior via the 'default' type. There are no alternative switching tools, so no exclusion is needed; the guidance is complete and actionable.

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