Skip to main content
Glama
calibre-mcp

calibre-mcp

by caelum29

Find duplicates

calibre_find_duplicates
Read-only

Detect probable duplicate books in a Calibre library by grouping exact or similar title/author matches, or compare selected records field-by-field with a merge-safety score. Read-only; never merges.

Instructions

Find probable duplicate books. mode=identical (exact title+authors) or similar (fuzzy) group the library (or ids/query/filter subset — filter takes a bundle name) with a merge-safety score; mode=compare diffs 2+ ids field-by-field. Read-only — never merges.

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": "calibre_find_duplicates"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
modeNoidentical
limitNo
queryNo
cursorNo
filterNo
libraryNo

Output Schema

NameRequiredDescriptionDefault
diffNo
keepNo
modeYes
countNo
cappedNo
groupsNo
offsetNo
bookIdsNo
groupCountNo
nextCursorNo
mergeSafetyNo
booksScannedNo
languagesDifferNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.10.0
    • addedOutput schema / properties / bookIds
      Added value: +{
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / diff
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agree": {
      +        "type": "boolean"
      +      },
      +      "field": {
      +        "type": "string"
      +      },
      +      "values": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "agree",
      +      "values"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / groups
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bookIds": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "type": "array"
      +      },
      +      "mergeSafety": {
      +        "type": "number"
      +      },
      +      "mixedLanguages": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "bookIds",
      +      "mergeSafety",
      +      "mixedLanguages"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changedv0.7.3
    • addedInput schema / properties / filter
      Added value: +{
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. First observedv0.7.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the bar is lower, but "Read-only — never merges" adds real value by pre-empting the assumption that a duplicate tool would mutate the library. It also discloses the shape of behaviour per mode (grouping with a merge-safety score vs a field-by-field diff). It stops short of noting cost/performance traits of library-wide fuzzy scans.

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?

Purpose is front-loaded in the first clause and every subsequent clause carries new information about modes or scoping. The telegraphic em-dash style is dense but readable; a slight cost is that the filter/library/query scoping is packed into a single parenthetical that a reader may need to re-parse.

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?

Output schema exists, so return values needn't be explained, and the description still signals what each mode yields (groups with merge-safety score, field diffs). Modes, scoping inputs, and the read-only guarantee are all covered, leaving nothing an agent needs before invoking 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?

With 0% schema description coverage the description carries the full burden, and it explains five of seven parameters: mode's three enum values, ids as the compare input, query as a subset selector, filter as a bundle name, and library. limit and cursor are undocumented, but they are conventional paging parameters, so the gap is minor.

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 probable duplicate books") and then names all three modes with their distinct semantics, which cleanly separates it from calibre_search and calibre_semantic_search. An agent can tell this is a dedup/comparison tool, not a retrieval tool, without opening the schema.

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?

Explicitly routes by mode: identical for exact title+authors, similar for fuzzy grouping, compare for field-by-field diffs of 2+ ids. It also indicates the scoping alternatives (whole library vs ids/query/filter subset). It does not say when to prefer a sibling search tool over this one, so guidance is clear but not fully exhaustive.

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