Skip to main content
Glama

Manage Zotero collections

zotero_manage_collections
Destructive

List, create, rename, reparent, or delete Zotero collections, and add or remove items from them. Manage collection structure and membership via action parameters.

Instructions

List, create, rename, reparent, or delete collections, and move items into or out of a collection. Set action to one of: "list" (collections with key/name/parent, sorted by name; q filters by name over the whole library, start/limit page, totalResults counts them all), "create" (needs name, optional parent_collection key; omit it for top-level), "rename" (needs collection_key + name), "reparent" (needs collection_key; parent_collection key, or omit to move to top level), "delete" (needs collection_key), "add_items" / "remove_items" (need collection_key + item_keys; collection membership lives on each item). All actions except "list" write to the cloud Web API. When the server sets a bulk-write threshold (ZOTEUS_CONFIRM_BULK_WRITES, off by default), removing more items than that from a collection in one call also needs confirm: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoOnly collections whose name contains this text (case-insensitive), searched over the whole library, not one page. Use it to find a collection by name.
nameNoCollection name (create/rename).
limitNoCollections to return (default 200, at most 1000).
startNoZero-based offset into the listing, for paging (default 0). Page with start += limit while `totalResults` is larger.
actionYesWhat to do. "list" reads every collection (then `q`, `start`, `limit` apply); "create" needs `name`; "rename" needs `collection_key` + `name`; "reparent" needs `collection_key`; "delete" needs `collection_key`; "add_items"/"remove_items" need `collection_key` + `item_keys`.
confirmNoRequired to remove more items in one call than the server's bulk-write threshold.
item_keysNoItem keys (add_items/remove_items).
library_idNoNumeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id.
library_typeNoWhich library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it.
collection_keyNoTarget collection key (all actions except list/create).
parent_collectionNoParent collection key; omit for top-level.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNoThe offset this page starts at.
failedNoOne entry per object the write could not land; absent or empty when all of them did.
createdNoKey of the collection created (action:"create").
deletedNoKey of the collection deleted.
updatedNoItem keys added to or removed from the collection.
completeNoFalse when the library holds more collections than Zoteus reads in one listing (10,000); the page then comes from those read.
collectionsNoThis page of the collections, sorted by name (action:"list").
totalResultsNoCollections matching in total (every collection when there is no `q`), not just this page. Page with start/limit while it is larger.
collection_keyNoThe collection renamed or reparented.
libraryVersionNoThe library's Last-Modified-Version after this write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.22.3
    • changedInput schema / properties / action / description
      Previous value: -"What to do. \"list\" reads every collection; \"create\" needs `name`; \"rename\" needs `collection_key` + `name`; \"reparent\" needs `collection_key`; \"delete\" needs `collection_key`; \"add_items\"/\"remove_items\" need `collection_key` + `item_keys`."New value: +"What to do. \"list\" reads every collection (then `q`, `start`, `limit` apply); \"create\" needs `name`; \"rename\" needs `collection_key` + `name`; \"reparent\" needs `collection_key`; \"delete\" needs `collection_key`; \"add_items\"/\"remove_items\" need `collection_key` + `item_keys`."
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Collections to return (default 200, at most 1000).",
      +  "maximum": 1000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "Only collections whose name contains this text (case-insensitive), searched over the whole library, not one page. Use it to find a collection by name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / start
      Added value: +{
      +  "description": "Zero-based offset into the listing, for paging (default 0). Page with start += limit while `totalResults` is larger.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / collections / description
      Previous value: -"Every collection in the library (action:\"list\")."New value: +"This page of the collections, sorted by name (action:\"list\")."
    • addedOutput schema / properties / complete
      Added value: +{
      +  "description": "False when the library holds more collections than Zoteus reads in one listing (10,000); the page then comes from those read.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / start
      Added value: +{
      +  "description": "The offset this page starts at.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / totalResults
      Added value: +{
      +  "description": "Collections matching in total (every collection when there is no `q`), not just this page. Page with start/limit while it is larger.",
      +  "type": "number"
      +}
  2. Changed1 schema field changedv1.21.0
    • addedInput schema / properties / library_id / exclusiveMinimum
      Added value: +0
  3. Changed2 schema fields changedv1.20.2
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  4. Changed4 schema fields changedv1.20.0
    • addedInput schema / properties / action / description
      Added value: +"What to do. \"list\" reads every collection; \"create\" needs `name`; \"rename\" needs `collection_key` + `name`; \"reparent\" needs `collection_key`; \"delete\" needs `collection_key`; \"add_items\"/\"remove_items\" need `collection_key` + `item_keys`."
    • addedInput schema / properties / library_id / description
      Added value: +"Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id."
    • addedInput schema / properties / library_type / description
      Added value: +"Which library to address: \"user\" (a personal library) or \"group\" (a shared group library). Omit to use the library this server is configured for. \"group\" on its own is refused: pass library_id with it."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "collection_key": {
      +      "description": "The collection renamed or reparented.",
      +      "type": "string"
      +    },
      +    "collections": {
      +      "description": "Every collection in the library (action:\"list\").",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "key": {
      +            "description": "8-character collection key.",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Collection name.",
      +            "type": "string"
      +          },
      +          "numItems": {
      +            "description": "Items directly in the collection, when the backend reports it.",
      +            "type": "number"
      +          },
      +          "parentCollection": {
      +            "description": "Parent collection key, or false for a top-level collection.",
      +            "type": [
      +              "string",
      +              "boolean"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "created": {
      +      "description": "Key of the collection created (action:\"create\").",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "deleted": {
      +      "description": "Key of the collection deleted.",
      +      "type": "string"
      +    },
      +    "failed": {
      +      "description": "One entry per object the write could not land; absent or empty when all of them did.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "code": {
      +            "description": "Zotero status for this object, e.g. 400 or 412.",
      +            "type": "number"
      +          },
      +          "index": {
      +            "description": "Position of the failed object in the request.",
      +            "type": "number"
      +          },
      +          "key": {
      +            "description": "Item key, when the failed object named one.",
      +            "type": "string"
      +          },
      +          "message": {
      +            "description": "Why Zotero refused it.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "libraryVersion": {
      +      "description": "The library's Last-Modified-Version after this write.",
      +      "type": "number"
      +    },
      +    "updated": {
      +      "description": "Item keys added to or removed from the collection.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed1 schema field changedv1.17.0
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Required to remove more items in one call than the server's bulk-write threshold.",
      +  "type": "boolean"
      +}
  6. First observedv1.0.4

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, openWorldHint=true), the description discloses that all non-list actions write to the cloud Web API and explains the conditional bulk-removal confirmation gate (ZOTEUS_CONFIRM_BULK_WRITES plus confirm: true). This adds real operational context, though it doesn't spell out reversibility of delete or permission requirements.

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 front-loaded with the verb list, then walks through each action's requirements in a single dense paragraph with no filler sentences. It is longer than typical but every clause maps to a distinct action, so the density is justified rather than padded.

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?

With an output schema present and annotations covering the safety profile, the description needs only to enumerate actions and their parameter requirements, which it does comprehensively for all seven actions. Nothing an agent needs to invoke the tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 11 parameters including action-specific requirements. The description restates those same action-to-parameter mappings (largely duplicating the action enum description) and adds no format or semantic detail the schema lacks, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names concrete verbs (list, create, rename, reparent, delete) against a specific resource (collections) plus item-membership moves, so an agent immediately knows the tool's scope. It does not, however, differentiate itself from the sibling zotero_list_collections, leaving a routing ambiguity for the 'list' action.

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?

The description maps each action to its required parameters (e.g. 'rename' needs collection_key + name, 'reparent' needs collection_key), which tells the agent how to invoke each mode. It does not address when to prefer this tool over siblings like zotero_list_collections or zotero_update_item, so no explicit exclusions are offered.

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