Skip to main content
Glama

List Zotero collections (read-only)

zotero_list_collections
Read-only

Returns all collections in a Zotero user or group library with keys, names, parent keys, and item counts, plus optional name search and paging to locate a collection.

Instructions

List collections in a Zotero library (key, name, parent collection key, item count), sorted by name. Read-only: available even in read-only mode (unlike zotero_manage_collections, which also writes). Every collection in the library is read, then q filters by name and start/limit page the result; totalResults says how many there are, so a large library is never mistaken for its first page. Use the keys to scope zotero_search_items (collectionKey) or zotero_tag_audit (scope.collection_keys).

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.
topNoOnly top-level collections.
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.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNoThe offset this page starts at.
completeNoFalse when the library holds more collections than Zoteus reads in one listing (10,000); the page then comes from those read.
collectionsYesThis page of the collections, sorted by name. Use a key to scope zotero_search_items or zotero_tag_audit.
totalResultsNoCollections matching in total (every collection when there is no `q`), not just this page. Page with start/limit while it is larger.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.22.3
    • 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: -"The collections in the library. Use a key to scope zotero_search_items or zotero_tag_audit."New value: +"This page of the collections, sorted by name. Use a key to scope zotero_search_items or zotero_tag_audit."
    • 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. Changed3 schema fields changedv1.20.0
    • 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": {
      +    "collections": {
      +      "description": "The collections in the library. Use a key to scope zotero_search_items or zotero_tag_audit.",
      +      "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"
      +    }
      +  },
      +  "required": [
      +    "collections"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.0.4

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/destructiveHint, but the description adds real behavioral context beyond them: it works in read-only mode, it reads every collection before filtering, and totalResults prevents mistaking a large library for its first page. These are non-obvious operational traits that a caller needs.

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 purpose is front-loaded and each sentence carries distinct information (scope, read-only behavior, filtering/paging, downstream key usage). It is dense but slightly long, with the paging and count explanation bordering on over-explanation given the schema already covers it.

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 values need not be described. Given six optional params and rich annotations, the description supplies everything an agent needs: scope, read-only safety, filtering/paging behavior, and library-addressing implications, with no relevant gap.

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 q, top, limit, start, library_id, and library_type, including the whole-library search and paging semantics the description repeats. The description adds no syntax or default detail beyond the schema, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('List collections in a Zotero library') and enumerates the returned fields (key, name, parent collection key, item count) plus sort order. It explicitly distinguishes itself from the sibling zotero_manage_collections, which also writes, so an agent can route correctly without opening either schema.

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?

Names the sibling alternative (zotero_manage_collections) and the condition that selects this tool (read-only mode). It also gives forward-routing guidance: 'Use the keys to scope zotero_search_items (collectionKey) or zotero_tag_audit (scope.collection_keys).' When-to-use and downstream use are both explicit.

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