Skip to main content
Glama

Permanently delete Zotero items

zotero_delete_items
Destructive

Permanently delete Zotero items by key, bypassing trash. Requires explicit confirmation and server enablement to remove items irreversibly.

Instructions

PERMANENTLY and IRREVERSIBLY delete items by key (this purges them — it is NOT the trash). Prefer zotero_trash_items, which is reversible. This tool is disabled unless the server is started with ZOTEUS_ALLOW_DELETE=true, and additionally requires confirm: true on every call. For the personal library it goes through the running Zotero desktop app when that app supports local-API writes, otherwise the cloud Web API. The current library version is used as a precondition; the operation auto-chunks to 50 keys per request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to proceed with permanent deletion.
item_keysYesItem keys to permanently delete.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesHow many were purged.
targetNoWhere the write went: "local" (Zotero desktop local API), "desktop" (connector protocol) or "cloud" (Zotero Web API).
deletedYesKeys purged from the library; this is not the trash and cannot be undone.

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. Changed3 schema fields changedv1.20.0
    • 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."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "count": {
      +      "description": "How many were purged.",
      +      "type": "number"
      +    },
      +    "deleted": {
      +      "description": "Keys purged from the library; this is not the trash and cannot be undone.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "target": {
      +      "description": "Where the write went: \"local\" (Zotero desktop local API), \"desktop\" (connector protocol) or \"cloud\" (Zotero Web API).",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "deleted",
      +    "count"
      +  ],
      +  "type": "object"
      +}
  4. First observedv1.0.4

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavioral context beyond the annotations: the server must be started with ZOTEUS_ALLOW_DELETE=true, every call requires confirm: true, execution routes through the local Zotero desktop app when that app supports local-API writes otherwise the cloud Web API, the current library version is used as a precondition, and the operation auto-chunks to 50 keys. All of this supplements the destructiveHint=true annotation without contradicting it.

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?

Front-loads the most safety-critical fact (permanence/irreversibility) in the first clause, then routes to the reversible alternative, then packs in dense but non-redundant operational details. Every sentence earns its place; nothing is wasted or repeated.

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 a destructive mutation tool with 4 parameters, the description covers the safety profile, server prerequisite, per-call confirmation, execution pathway, precondition, and chunking behavior, all complemented by a 100%-covered schema, an output schema, and relevant annotations. An agent has everything needed to invoke it correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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

Schema coverage is 100% and the schema already documents all four parameters thoroughly (confirm must be true, item_keys minItems 1, library_id entity semantics, library_type enum with group-without-id refusal). The description reinforces the confirm requirement and the 'by key' mapping to item_keys, but adds no parameter meaning the schema doesn't already convey, so the baseline of 3 applies.

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?

Opens with a specific verb and resource: 'PERMANENTLY and IRREVERSIBLY delete items by key,' and clarifies this purges them and is NOT the trash. This sharply distinguishes it from the sibling zotero_trash_items without needing to open either schema.

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 names the reversible alternative and tells the agent to prefer it: 'Prefer zotero_trash_items, which is reversible.' This is the clearest possible routing guidance for choosing between the destructive and safe siblings.

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