Skip to main content
Glama

zotero_batch_update_extra

Batch update the Extra field across multiple Zotero items: add, update, or remove key: value lines, including upsert and replace modes.

Instructions

Upsert and/or remove Key: value lines in the Extra field across multiple items in one call — the batch counterpart of zotero_update_item for Extra-field metadata (Better BibTeX citation keys, tex.* fields, CSL variables). item_keys: list of item keys to edit (or a JSON-encoded list string). set_keys: mapping of key→value lines to upsert (or a JSON object string); an existing line with the same key is replaced in place, otherwise the line is appended. remove_keys: list of key names whose lines are deleted. replace: when true, rebuild Extra from set_keys only, dropping every other line (incompatible with remove_keys). Keys are matched by their key: prefix, case-insensitively; free-form lines without a colon are preserved. Items needing no change, attachments/notes/annotations, and unknown keys are skipped (counted in the summary). Requires a writable library (web API key or hybrid mode) — fails in local-only mode. Example: zotero_batch_update_extra(item_keys=['ABCD1234', 'EFGH5678'], set_keys={'tex.otscore': '2'}, remove_keys=['tex.draft']).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_keysNoItem keys to edit (list or JSON-encoded list string)
set_keysNoMapping of key→value lines to upsert (dict or JSON object string)
remove_keysNoKey names whose lines are deleted (list or JSON string)
replaceNoWhen true, rebuild Extra from set_keys only

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description discloses key behaviors: case-insensitive key matching, preservation of free-form lines, skipping of unchanged items/attachments/notes/unknown keys, and the replace parameter's effect and incompatibility with remove_keys.

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 description is comprehensive yet well-structured, starting with the core function, then parameter details, behavioral notes, requirements, and an example. It is front-loaded with essential information and avoids 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 the tool's complexity (4 parameters, batch operation, multiple edge cases) and the presence of an output schema, the description covers all necessary aspects: parameter semantics, behavior, constraints (writable library), and provides an example. It is fully self-contained.

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?

Although schema coverage is 100%, the description adds crucial semantic details: how keys are matched (case-insensitive prefix), behavior of replace (rebuild from set_keys only), and the incompatibility of replace with remove_keys, enriching understanding 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 explicitly states the tool's purpose: 'Upsert and/or remove Key: value lines in the Extra field across multiple items in one call' and identifies it as the batch counterpart of zotero_update_item, clearly differentiating from siblings.

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 context for when to use (batch Extra field updates), notes prerequisites (writable library), and implies alternatives (zotero_update_item for single items). It could explicitly state when not to use, but the context is sufficient.

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

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