Skip to main content
Glama
calibre-mcp

calibre-mcp

by caelum29

Merge duplicate books

calibre_merge_books
Read-onlyIdempotent

Merge duplicate Calibre book records by moving formats into a target book, merging metadata, and trashing sources, with safe/formats-only modes and dry-run preview.

Instructions

Merge duplicate book records: moves formats from the sourceIds books into targetId (the target's copy wins conflicts), merges metadata per Calibre's rules, then trashes the sources. mode=safe keeps sources; mode=formatsOnly moves formats only. Dry-run unless confirm=true. Previews work without writes; applying needs CALIBRE_MCP_ENABLE_WRITE.

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": {
      "targetId": "<targetId>",
      "sourceIds": "<sourceIds>"
    },
    "name": "calibre_merge_books"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNomerge
confirmNo
libraryNo
targetIdYes
sourceIdsYes

Output Schema

NameRequiredDescriptionDefault
modeNo
stepsNo
statusNo
targetIdNo
warningsNo
indexNoteNo
sourceIdsNo
formatMovesNo
writeEnabledNofalse on a preview in a session with writes disabled: applying it will be refused (write_disabled)
metadataChangesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.0

TDQS

A3.8/5.0
Behavior1/5

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

The description discloses rich behavior — format moving, metadata merging, trashing of sources, dry-run default, and the CALIBRE_MCP_ENABLE_WRITE gate — but that directly conflicts with `readOnlyHint: true`, which promises the tool does not modify its environment. In reality the tool destroys source records when confirm=true, so an agent trusting the annotation could invoke it expecting a safe read.

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?

Every sentence carries load-bearing information: the core action first, then mode variants, then the dry-run default, then the write-enablement prerequisite. No filler and no repetition of the name or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter destructive operation this covers the essential ground — mutation effects, conflict rule, mode variants, dry-run default, and the environment prerequisite — and an output schema exists so return values need no explanation. The undocumented `library` parameter keeps it just short of complete.

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 mostly succeeds: it explains the `sourceIds`→`targetId` direction, conflict resolution (target's copy wins), the three mode behaviors, and the confirm semantics. The `library` parameter is left entirely unexplained in both schema and description, which is the one remaining gap.

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?

Names a specific verb and resource ("Merge duplicate book records") and then spells out the mechanics: formats move from `sourceIds` into `targetId`, metadata is merged per Calibre rules, sources are trashed. That mechanical detail distinguishes it from the discovery-oriented sibling `calibre_find_duplicates` without needing to name it.

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?

Clear operating context: mode semantics are spelled out (safe keeps sources, formatsOnly moves formats only), and the default is a dry run unless confirm=true with write access enabled. What is missing is any pointer to the sibling that locates duplicates (`calibre_find_duplicates`) before merging, so the agent must infer the discovery-then-merge workflow.

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