Skip to main content
Glama
JingYangYuan

zotero-local-mcp

by JingYangYuan

zotero_switch_library

Sets the active Zotero library for subsequent operations. Specify the library ID and type (user, group, or default) to direct all further reads and writes to that library.

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

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It clearly explains that the change persists for the session, affects all subsequent tool calls, fails fast on inaccessible library IDs, and that library_id is ignored in default mode. These are critical stateful behaviors that the 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?

The description is longer than average, but every sentence provides operational value: persistence, scope, discovery, mode semantics, failure behavior, and examples. It is front-loaded with the most important stateful behavior and remains structured and readable.

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 stateful configuration tool, the description covers everything needed for correct invocation: how to find valid IDs, persistence semantics, all library_type modes, reset behavior, failure mode, and examples. The existence of an output schema means return-value details are not required here.

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?

While the schema covers both parameters, the description adds meaning beyond the schema by documenting the 'feeds' library_type, which is missing from the schema's type list, and by clarifying the behavior of 'default' mode. It also clarifies the relationship between library_id and library_type beyond the schema's basic 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 uses a specific verb and resource: 'Switch the active library context,' and clearly states that this determines the target of every subsequent read/write tool call. It also distinguishes itself from sibling tools like zotero_list_libraries, which discovers libraries rather than switching 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?

It explicitly instructs users to discover valid library IDs/types via zotero_list_libraries first and warns not to guess. It also explains when each library_type value should be used, including the 'default' reset mode, and provides concrete examples.

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