Skip to main content
Glama

Zotero Get Collections

zotero_get_collections

List all collections in the active Zotero library as a hierarchical tree, including parent and nested subcollections with keys. Use to view the full library structure.

Instructions

List all collections in the currently active Zotero library as a hierarchical tree (parents and nested subcollections, each with its 8-character key). Use this when the user wants to see the full library structure. If you already know a name and just need the key, prefer zotero_search_collections — it returns only matches. Scope is limited to the active library — switch libraries with zotero_switch_library before listing. Deep hierarchies render inline without truncation, so very deep trees can be long. limit: cap on collections returned; pass None (default) to use 100, or raise to 5000 for libraries with thousands of collections. include_trashed: when True, also show collections in the Zotero Trash (annotated as such). Default False, matching Zotero desktop's default view. Example output:

  • Orals (Key: MT53KB66)

    • Early America (Key: 3249BZKE)

      • I. Historiography & Methodology (Key: XFN79DUT)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of collections to return
include_trashedNoif True, merge collections currently in Zotero's Trash into the listing, annotated with ``[trashed]``. Default False matches the Zotero desktop default and the prior behavior of this tool. Trashed collections are normally invisible to automated clients (#233) — turn this on when you need to know they exist.

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 carries full behavioral disclosure. It covers the hierarchical output, the 8-character key format, the lack of truncation for deep trees (with the consequence that output may be long), the limit behavior (default 100, up to 5000), and the include_trashed behavior (annotated as [trashed], default matching the desktop view). No contradictions with annotations were found.

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?

Every sentence serves a purpose: purpose, usage guidance, scope caveat, output length warning, parameter explanations, and a concrete example. The front-loaded purpose sentence immediately tells an agent what this tool is for. The example output makes the return format tangible with no wasted words.

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 covers the essential context for both selection and invocation: what the tool returns, its scope, how to change scope, parameter behavior, and a representative example. An output schema exists, so return-value documentation is not needed. No significant gaps remain for the agent to resolve through trial and error.

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 schema already documents both parameters. The description adds practical context: passing None for limit uses 100, and raising to 5000 is suggested for large libraries. For include_trashed, it restates the default but reinforces the desktop-matching semantics already present in the schema. This goes slightly beyond the baseline without adding non-essential detail.

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 ('List all collections') and a precise resource scope (the currently active Zotero library, as a hierarchical tree with 8-character keys). It also explicitly distinguishes itself from zotero_search_collections, which finds single matches by name, leaving no ambiguity about what this tool does.

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 tells the agent when to use this tool ('when the user wants to see the full library structure') and when to prefer an alternative ('If you already know a name and just need the key, prefer zotero_search_collections'). It also instructs the agent to switch libraries with zotero_switch_library if the active library is not the desired scope.

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