Skip to main content
Glama

Export Zotero items

zotero_export
Read-only

Export Zotero items as raw bibliographic text in formats like BibTeX, RIS, or CSL JSON, with filters for collections, item types, or search terms.

Instructions

Export items in a bibliographic format and return the raw text. Choose format (bibtex, biblatex, better-biblatex, ris, csljson, csv, mods, tei, coins, rdf_*, refer, wikipedia, bookmarks). Stock formats are rendered by Zotero itself: by the desktop app when it serves the selected library (no cloud key needed), by the Web API otherwise. biblatex is Zotero's STOCK translator; BBT-specific options (citation-key generation, sentence-case, biblatexExtendedNameFormat, unicode→LaTeX) are NOT available there. better-biblatex uses the local desktop Better BibTeX plugin (your configured BBT export options apply) and is only available when desktop Zotero + BBT are running; it degrades to built-in biblatex otherwise. Narrow with item_keys, collection_key, q, or item_type. A limit (default 50) is always applied. An export that renders no entries says so instead of returning a blank body: named item_keys that render none are an error, and any other selection that renders none comes back with empty: true. For styled human bibliographies use the bibliography tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoQuick-search string to narrow the export (title/creator/year).
limitNoMax items to export (default 50, max 100).
formatYesExport format to render, e.g. "bibtex", "biblatex", "better-biblatex", "ris", "csljson", "csv". "better-biblatex" needs the desktop Better BibTeX plugin and degrades to "biblatex" without it.
item_keysNoRestrict to these 8-character item keys. Keys that render no entry are an error rather than a blank body.
item_typeNoBoolean itemType filter, e.g. "journalArticle || book" or "-attachment".
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_keyNoRestrict to a collection by key. A key this library does not have is refused, never answered with the whole library.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe raw export, the same bytes as the text block.
emptyNoTrue when Zotero rendered no entries at all for the selection.
formatYesThe format actually rendered; "biblatex" when better-biblatex degraded to the built-in translator.
lengthYesCharacters of exported text.
noticeNoWhy an empty export is empty.
sourceNoSet to "local-bbt" when the desktop Better BibTeX plugin rendered it.
degradedToBuiltInNoTrue when better-biblatex was asked for and Zotero's built-in biblatex answered.

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. Changed8 schema fields changedv1.20.0
    • addedInput schema / properties / format / description
      Added value: +"Export format to render, e.g. \"bibtex\", \"biblatex\", \"better-biblatex\", \"ris\", \"csljson\", \"csv\". \"better-biblatex\" needs the desktop Better BibTeX plugin and degrades to \"biblatex\" without it."
    • addedInput schema / properties / item_keys / description
      Added value: +"Restrict to these 8-character item keys. Keys that render no entry are an error rather than a blank body."
    • addedInput schema / properties / item_type / description
      Added value: +"Boolean itemType filter, e.g. \"journalArticle || book\" or \"-attachment\"."
    • 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."
    • addedInput schema / properties / limit / description
      Added value: +"Max items to export (default 50, max 100)."
    • addedInput schema / properties / q / description
      Added value: +"Quick-search string to narrow the export (title/creator/year)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "degradedToBuiltIn": {
      +      "description": "True when better-biblatex was asked for and Zotero's built-in biblatex answered.",
      +      "type": "boolean"
      +    },
      +    "empty": {
      +      "description": "True when Zotero rendered no entries at all for the selection.",
      +      "type": "boolean"
      +    },
      +    "format": {
      +      "description": "The format actually rendered; \"biblatex\" when better-biblatex degraded to the built-in translator.",
      +      "type": "string"
      +    },
      +    "length": {
      +      "description": "Characters of exported text.",
      +      "type": "number"
      +    },
      +    "notice": {
      +      "description": "Why an empty export is empty.",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Set to \"local-bbt\" when the desktop Better BibTeX plugin rendered it.",
      +      "type": "string"
      +    },
      +    "text": {
      +      "description": "The raw export, the same bytes as the text block.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "format",
      +    "length",
      +    "text"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changedv1.18.0
    • addedInput schema / properties / collection_key / description
      Added value: +"Restrict to a collection by key. A key this library does not have is refused, never answered with the whole library."
  5. First observedv1.0.4

TDQS

A5/5.0
Behavior5/5

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

Annotations mark this as read-only and non-destructive, and the description adds substantial behavioral detail: raw text is returned, default limit is always applied, empty results are reported with 'empty: true', and named item_keys that render nothing become errors. It also discloses environment-dependent behavior such as desktop rendering versus Web API and BBT degradation, which annotations do not capture.

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 every sentence earns its place: primary purpose is stated first, then format selection, environment/plugin behavior, narrowing mechanisms, and empty-result semantics. It packs significant decision-relevant detail without redundant 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 export tool with an output schema, the description covers the essential operational concerns: format availability, plugin dependencies, defaults, empty-result behavior, error conditions, and pointer to sibling bibliography tools. 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.

Parameters5/5

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

The schema already covers parameters at 100%, but the description meaningfully enriches them: it explains the practical differences among formats such as bibtex vs biblatex vs better-biblatex, clarifies stock translator limits, documents the always-applied limit, and clarifies collection_key refusal behavior. This goes well beyond the schema descriptions.

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 clear verb and object: 'Export items in a bibliographic format and return the raw text.' It distinguishes this tool from styled bibliography creation by explicitly directing users to 'the bibliography tools' for human-readable bibliographies, and the raw-text framing separates it from search/import siblings.

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?

The description gives concrete selection criteria: stock formats versus better-biblatex, when BBT is available versus when it degrades, and when to use bibliography tools instead. It also explains how to narrow exports and what happens when nothing renders, so an agent knows when this tool is appropriate and when it is not.

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