Skip to main content
Glama
calibre-mcp

calibre-mcp

by caelum29

Search books

calibre_search
Read-only

Searches a Calibre library by title, author, ISBN, tag, full text, annotations, or notes; supports filters and count-only queries to locate books or matches.

Instructions

Find books by query: exact title, author, ISBN, tag, or Calibre query syntax (mode=meta), or full text (mode=fts). mode=fts words match independently and stemmed (events matches event); wrap a phrase in double quotes for an exact match ("event sourcing"); supports AND/OR/NOT between terms (uppercase, e.g. a NOT b). scope=book returns short keyword snippets from inside one book; first hits often land in TOC/front matter — for definitional or topic questions within a book prefer calibre_semantic_search scope=book (ranked passages with char offsets). Use calibre_semantic_search for meaning/topic queries. For "how many" questions use countOnly=true (returns only the count). filter accepts a bundle name to scope the search (list bundles via calibre_manage_bundles). Calibre 9.18+: mode=annotations searches highlights, their notes and bookmark titles (filter applies; scope=book + bookId searches one book, query "*" lists all its annotations); mode=notes searches notes attached to authors, series, tags, publisher (filters do not apply), and query "authors:Name" (or series:/tags:/publisher:/#custom:, item may be quoted) shows the whole note of that item.

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": {
      "query": "<query>"
    },
    "name": "calibre_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNometa
sortNo
limitNo
queryYes
scopeNolibrary
bookIdNo
cursorNo
filterNo
libraryNo
countOnlyNo
sortOrderNo
include_excludedNo

Output Schema

NameRequiredDescriptionDefault
hitsNo
modeNo
countNo
notesNo
queryNo
scopeNo
totalNo
bookIdNo
filterNo
offsetNo
bookIdsNo
indexingNo
nextCursorNo
paramNotesNoA line per limit param that fell back to its default or max instead of the value sent
annotationsNo
snippetsSkippedNo
exclusionsAppliedNo
exclusionsRemovedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.14.0
    • removedInput schema / properties / query / minLength
      Removed value: -1
    • addedOutput schema / properties / paramNotes
      Added value: +{
      +  "description": "A line per limit param that fell back to its default or max instead of the value sent",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed5 schema fields changedv0.13.0
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "meta",
      -  "fts"
      -]New value: +[
      +  "meta",
      +  "fts",
      +  "annotations",
      +  "notes"
      +]
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / annotations
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bookId": {
      +        "type": "number"
      +      },
      +      "chapter": {
      +        "type": "string"
      +      },
      +      "format": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "number"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      },
      +      "timestamp": {
      +        "type": "string"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "user": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "bookId",
      +      "format",
      +      "type",
      +      "text",
      +      "user"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / exclusionsRemoved
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / notes
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "field": {
      +        "type": "string"
      +      },
      +      "item": {
      +        "type": "string"
      +      },
      +      "snippet": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "item"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Changed2 schema fields changedv0.12.0
    • addedOutput schema / properties / indexing
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "left": {
      +      "type": "number"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "left",
      +    "total"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / snippetsSkipped
      Added value: +{
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
  4. Changed1 schema field changedv0.10.0
    • addedOutput schema / properties / hits
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bookId": {
      +        "type": "number"
      +      },
      +      "snippet": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "snippet"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. Changed4 schema fields changedv0.7.3
    • addedInput schema / properties / filter
      Added value: +{
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / include_excluded
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / exclusionsApplied
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / filter
      Added value: +{
      +  "type": "string"
      +}
  6. First observedv0.7.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes far beyond them, disclosing stemming and independent word matching in fts, double-quote phrase syntax, uppercase AND/OR/NOT, the TOC/front-matter ranking hazard, that filters do not apply in notes mode, and that annotations mode requires Calibre 9.18+.

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 query/mode explanation before the caveats and alternatives, and every sentence carries real information. It is, however, a single very dense paragraph with multiple semicolon-chained clauses, which makes it harder to scan than a short bulleted structure would be.

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?

Return values need no explanation because an output schema exists, and the version-gated and mode-specific behaviors are covered thoroughly. The remaining gap is pagination and limit/sort semantics for a 12-parameter search tool, which the description never addresses.

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: it defines mode values, scope=book vs library, bookId usage with annotations, countOnly, filter as a bundle name, and the query syntax per mode, including 'authors:Name' and the '*' wildcard. It leaves sort, sortOrder, limit, cursor, library and include_excluded unexplained, so pagination and sorting behavior must be inferred.

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 (find books) and immediately enumerates the four search modes (meta, fts, annotations, notes) with their distinct matching semantics, so an agent can tell this apart from calibre_semantic_search or calibre_get_book without opening a 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 routes the agent: use calibre_semantic_search for meaning/topic questions, prefer it at scope=book for definitional queries because first FTS hits land in TOC/front matter, use countOnly=true for 'how many' questions, and use calibre_manage_bundles to list bundle names for filter. This is a clear when/when-not/alternative mapping.

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