Skip to main content
Glama

Zotero Batch Update

zotero_batch_update

Batch-edit Zotero item metadata: add or remove tags and upsert or delete Key: value lines in Extra for many items selected by item keys, search query, or tag.

Instructions

Edit metadata across many items in one call: add/remove tags and upsert/remove Key: value lines in Extra (Better BibTeX keys, tex.* fields). Select items by item_keys, and/or a free-text query, and/or an existing tag (query and tag are ANDed; tag may be a list to OR); item_keys wins. At least one selector AND one action are required. add_tags/remove_tags keep the item's other tags — not a replace-all. set_keys upserts Extra lines, matching a line case-insensitively by its key: prefix and replacing it in place, else appending; remove_keys deletes those lines; lines without a colon are preserved. limit: max items for query/tag selection (default 50). Attachments and items needing no change are skipped and counted. Requires a writable library. Example: zotero_batch_update(tag='to-read', add_tags=['reviewed'], remove_tags=['to-read']).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
limitNo
queryNo
add_tagsNo
set_keysNo
item_keysNo
remove_keysNo
remove_tagsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and meets it well: it discloses non-replace-all tag behavior, upsert-vs-append semantics, case-insensitive line matching, preservation of lines without colons, skipping/counting of attachments and no-op items, and the writable-library prerequisite. These are genuine behavioral facts beyond the schema.

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?

Despite being a dense paragraph, it is front-loaded with the core function and every sentence carries a distinct rule or constraint. No filler or repetition; the length is justified by the tool's complexity.

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 batch mutation tool with no annotations, the description covers selector semantics, action semantics, constraints, edge cases (no-op items, colons), and a prerequisite. An output schema exists, so the lack of return-format detail in prose is not a gap.

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 description coverage is 0%, so the description must compensate, and it does: every selector and action parameter is given operational meaning (tag can be a list ORed, limit caps query/tag selection, item_keys takes precedence, set_keys matches by key: prefix, remove_keys deletes those lines). The example further ties tag/add_tags/remove_tags together.

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 and resource ('Edit metadata across many items in one call'), names two concrete operation families (tags and Extra key/value lines), and is clearly distinct from the single-item sibling zotero_update_item and the read/search tools. No ambiguity about what the tool accomplishes.

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?

It states the selection model (item_keys, query, tag), AND/OR semantics, 'item_keys wins' priority, and the requirement that at least one selector and one action be present. It does not explicitly say 'use this instead of zotero_update_item for batch edits,' but 'across many items in one call' supplies clear context for when it applies.

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