Skip to main content
Glama

find_duplicates

Detect duplicate items in your Zotero library or check whether DOIs already exist before adding them. Reports candidate groups for review without merging, editing, or deleting anything.

Instructions

Find duplicate items in your Zotero library. Read-only: it never merges, edits or deletes anything — it only reports candidates for the user to resolve.

Two modes:

  • With 'dois' (up to 50): checks which of those DOIs are ALREADY in the library. Returns, per DOI, the matching items (item_key, title, year, first author, type). Run this before add_items_by_doi and skip the DOIs that already have an entry, to avoid creating duplicates.

  • Without 'dois': scans the library (or a single collection) for duplicate groups — items that share a normalized DOI, or a normalized title (ignoring case, accents and punctuation; same year required when both items have one; very short/generic titles skipped). Each group lists its items so the user decides which to keep.

Only regular items are scanned: notes, attachments and the trash are skipped, up to 5000 items (in both modes). The result reports 'scanned' (regular items examined) and 'truncated' (true if the cap was hit before the end; in 'dois' mode a DOI past the cap may then be missed). Pass 'collection_key' to limit the scan to one collection.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_duplicates"
  }
}

Input Schema

NameRequiredDescriptionDefault
doisNoOptional: check these DOIs (bare or as https://doi.org/… URLs, up to 50) against the library and return, per DOI, the items already present. Use before add_items_by_doi. Omit to scan for duplicate groups instead.
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.
collection_keyNoOptional: limit the scan to the items directly in this collection (from get_collections). Omit to scan the whole library.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.9/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: it declares read-only semantics explicitly ('never merges, edits or deletes'), names what is skipped (notes, attachments, trash), states the 5000-item cap and the truncation edge case where a DOI past the cap may be missed. It also discloses the matching algorithm (normalized DOI; normalized title ignoring case, accents, punctuation; same-year requirement; short/generic titles skipped), which is exactly the behavior an agent cannot get from structured fields.

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 single most important fact (read-only, reports only) before the mode breakdown, then uses a mini-list for the two modes and a closing paragraph for scope and limits. Dense but every sentence adds usable information; nothing is redundant with the schema.

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?

There is no output schema, so the description must describe returns, and it does: per-DOI matching items with their fields (item_key, title, year, first author, type), the structure of duplicate groups, and the 'scanned'/'truncated' result fields. Nothing an agent needs to call this correctly or interpret the response is missing.

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 schema already documents all four parameters and the baseline is 3. The description adds genuine meaning beyond the schema by explaining the mode switch between 'dois' and its absence, and that 'collection_key' narrows the scan scope, including the 5000-item cap that applies in both modes.

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 (find duplicate items in the Zotero library) and immediately disambiguates its two distinct operating modes. It also names a sibling, add_items_by_doi, making it separable from the add path without opening any 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?

Gives explicit when-to-use instructions for both modes: call with 'dois' before add_items_by_doi and skip DOIs that already have an entry; omit 'dois' to scan for duplicate groups. The exclusion case (which DOIs to skip) is spelled out rather than left to inference.

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