Skip to main content
Glama

delete_items

Delete one or more Zotero library items by key; by default move them to the recoverable Zotero trash, or set permanent to erase them.

Instructions

Delete one or more items from your Zotero library. By default they are moved to the Zotero trash (recoverable by the user from Zotero → Trash); pass permanent: true to delete them for good (not recoverable), which is the old behaviour — confirm with the user first for a permanent delete. Moving an item to the trash does not move its child notes or attachments to the trash (they stay in the library), matching the Zotero app; a permanent delete also removes an item's children. A key already in the trash is reported in already_in_trash (use permanent: true to erase it). Accepts up to 50 item keys per call. Disabled unless the server setting UNSAFE_OPERATIONS is 'items' or 'all' (the same setting gates both trash and permanent deletion).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "item_keys": "<item_keys>"
    },
    "name": "delete_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_keysYesArray of Zotero item keys to delete (e.g. ["EUHUT5K3", "F9UQM7N2"]). Max 50 per call.
permanentNofalse (default): move the items to the Zotero trash, where the user can restore them. true: delete them permanently (not recoverable).
library_idNoNumeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library.
library_typeNoLibrary for this call: 'user' (personal) or 'group'. Default: the library configured on the server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.0
    • addedInput schema / properties / permanent
      Added value: +{
      +  "default": false,
      +  "description": "false (default): move the items to the Zotero trash, where the user can restore them. true: delete them permanently (not recoverable).",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv2.0.4
    • changedInput schema / properties / library_id / description
      Previous value: -"Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library."New value: +"Numeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library."
    • changedInput schema / properties / library_type / description
      Previous value: -"Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server."New value: +"Library for this call: 'user' (personal) or 'group'. Default: the library configured on the server."
  3. Changed3 schema fields changedv2.0.2
    • addedInput schema / properties / item_keys / items / pattern
      Added value: +"^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$"
    • addedInput schema / properties / library_id
      Added value: +{
      +  "description": "Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library.",
      +  "pattern": "^\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / library_type
      Added value: +{
      +  "description": "Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server.",
      +  "enum": [
      +    "user",
      +    "group"
      +  ],
      +  "type": "string"
      +}
  4. First observedv1.0.9

TDQS

A4.6/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 does so thoroughly: recoverability of trash vs permanent deletion, that trashing leaves child notes/attachments in the library while permanent deletion removes children, that keys already in trash are reported in already_in_trash, and that the tool is disabled unless UNSAFE_OPERATIONS is 'items' or 'all'.

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?

Front-loaded with the core action and dense with useful detail, but slightly long — the aside 'which is the old behaviour' and some restatement of the schema's permanent description could be trimmed without loss.

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, gated mutation with no output schema, the description covers recoverability, child-item side effects, the already_in_trash response field, limits, and the server-config prerequisite — everything an agent needs before calling it.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: the downstream effect of permanent (children also erased), the already_in_trash reporting for item_keys, and the 50-key cap tied to the gating setting.

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?

States a specific verb and resource ('Delete one or more items from your Zotero library') with scope (up to 50 keys), and the trash-vs-permanent distinction makes it clearly distinct from sibling tools like delete_collection or update_item.

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?

Explains the default (trash) versus opt-in (permanent) path and instructs the agent to confirm with the user before a permanent delete, plus the server-setting prerequisite. It does not name an alternative tool or explicitly say when not to use this one, so it falls short of a 5.

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