Skip to main content
Glama

Manage Zotero collections

zotero_manage_collections
Destructive

Manage Zotero collections by listing, creating, renaming, reparenting, deleting, or moving items in and out. Choose an action to organize your library structure.

Instructions

List, create, rename, reparent, or delete collections, and move items into or out of a collection. Set action to one of: "list" (all collections with key/name/parent), "create" (needs name, optional parent_collection key — omit 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
nameNoCollection name (create/rename).
actionYesWhat 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`.
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
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.
collectionsNoEvery collection in the library (action:"list").
collection_keyNoThe collection renamed or reparented.
libraryVersionNoThe library's Last-Modified-Version after this write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.21.0
    • addedInput schema / properties / library_id / exclusiveMinimum
      Added value: +0
  2. 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#"
  3. 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"
      +}
  4. 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"
      +}
  5. First observedv1.0.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already convey destructiveHint=true and readOnlyHint=false, and the description adds meaningful context: 'All actions except "list" write to the cloud Web API', the bulk-write threshold gate (ZOTEUS_CONFIRM_BULK_WRITES), and the conceptual note that 'collection membership lives on each item'. This goes beyond the annotations by clarifying write behavior and the confirm requirement.

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 dense but efficient: it front-loads the action list, then breaks down each action's required parameters in a compact, scannable format, and finishes with a crucial caveat about confirm. Every sentence serves a purpose and there is no filler.

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 an 8-parameter, 7-action tool, the description plus a 100%-covered schema and an output schema provides all necessary context: every action's required inputs, library addressing behavior, write semantics, and the bulk-write confirm edge case. Nothing needed to invoke it correctly is missing.

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. The description adds value beyond the schema by explaining nuances like 'omit for top-level', 'omit to move to top level', and the behavioral note about collection membership living on each item, which clarifies the semantics of parent_collection and item_keys without repeating the schema verbatim.

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+resource phrase: 'List, create, rename, reparent, or delete collections, and move items into or out of a collection.' It enumerates every supported action, which distinguishes it from read-only sibling tools like zotero_list_collections by stating which actions write.

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 provides clear per-action requirements and explicitly notes that all actions except 'list' write to the cloud API, implying that this tool is for mutations while listing is the read path. However, it does not explicitly name the read-only sibling zotero_list_collections or state 'use that instead if you only need an inventory', so exclusions are implied rather than fully explicit.

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