Skip to main content
Glama

zotero_get_collections

Retrieve a hierarchical tree of all collections in the active Zotero library, including nested subcollections with their keys. Useful for viewing the complete 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
Behavior5/5

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

With no annotations provided, the description fully covers behavior: returns hierarchical tree with keys, inline rendering without truncation, limit default and maximum, include_trashed effect with annotation, and scope to active library.

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?

Well-structured and front-loaded with purpose, usage guidance, parameter details, and example. Every sentence adds value without redundancy.

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?

Given 2 params, existing output schema, and many sibling tools, the description fully covers purpose, usage, parameter behavior, and output format with an example.

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?

Schema coverage is 100% but description adds significant meaning: explains limit default and max, describes trashed annotation behavior, and gives context for both parameters beyond the schema.

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 clearly states the tool lists collections as a hierarchical tree with keys, and distinguishes it from zotero_search_collections by specifying when to use each.

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?

Explicitly states when to use this tool (full library structure) and when to prefer the sibling zotero_search_collections (known name, need key). Also notes scope limitation and need to switch libraries first.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/54yyyu/zotero-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server