Skip to main content
Glama
riverai

ebook-translator-mcp

by riverai

MCP for Calibre Ebook Translator

English | 简体中文

Python 3.10+ Plugin v2.4.2 verified License MIT

An MCP server that lets any AI agent (Claude Desktop, Claude Code, Cursor, Cline, dsh, ...) read and write the translation cache of the Calibre Ebook Translator plugin — directly, chunk by chunk, replacing manual copy-paste.

The plugin keeps doing what it is good at (parsing ebooks, splitting text into numbered chunks, merging output). The agent does the translation in your chat window, using any model you like. The book never leaves your machine: everything happens through local SQLite cache files.

The plugin's advanced mode: each numbered row is one chunk the MCP tools can read and write

How it works

The Ebook Translator plugin stores each book's translation progress in a SQLite cache. This server opens those cache files read/write and exposes ten tools: list books, inspect chunk status, read a chunk's original text, read or write its translation — inline or via local files — and clear translations for rework. Every response echoes the book id and title so the agent (and you) can always verify which book is being touched.

Key properties:

  • Chunk-addressed: one chunk = one numbered row in the plugin's advanced mode table. chunk_id is the database row id — it never changes, even if you delete other rows in the UI.

  • Alignment-aware: when the plugin's merged translation is enabled, a translation must split into the same number of blank-line-separated blocks as its original, otherwise the plugin highlights the row yellow. The server replicates this exact check and reports aligned on every read and write — you know before reopening the plugin whether a row would go yellow.

  • Safe by construction: only existing cache files are touched; writes are short retrying transactions, safe to run while Calibre is open; SQL is fully parameterized and book_id cannot escape the cache directory.

Related MCP server: Calibre MCP Server

Requirements

  • Calibre with the Ebook Translator plugin (verified against v2.4.2), with a book already segmented in advanced mode (caching enabled, or the advanced-mode window still open)

  • Python 3.10+ (from python.org — on Windows, avoid the Microsoft Store stub, see Troubleshooting)

  • Any MCP client that supports stdio servers

Install

Option A — run directly with uv (no install, no clone):

uvx --from git+https://github.com/riverai/MCP-for-Calibre-Ebook-Translator ebook-translator-mcp --selftest

Option B — manual:

pip install mcp
# download ebook_translator_mcp.py, then:
python /path/to/ebook_translator_mcp.py --selftest

The self-test prints the cache directory it detected and every book it can see. If your books show up there, the server will work.

Connect your MCP client

The server name below can be anything; command/args is what matters.

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "ebook-translator": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/riverai/MCP-for-Calibre-Ebook-Translator",
        "ebook-translator-mcp"
      ]
    }
  }
}

or, with a local copy and pip install mcp:

{
  "mcpServers": {
    "ebook-translator": {
      "command": "python",
      "args": ["C:/tools/MCP-for-Calibre-Ebook-Translator/ebook_translator_mcp.py"]
    }
  }
}

Claude Code:

claude mcp add ebook-translator -- uvx --from git+https://github.com/riverai/MCP-for-Calibre-Ebook-Translator ebook-translator-mcp
# or: claude mcp add ebook-translator -- python /absolute/path/to/ebook_translator_mcp.py

Cursor (.cursor/mcp.json or ~/.cursor/mcp.json) and Cline (cline_mcp_settings.json): use the same mcpServers JSON as Claude Desktop.

dsh: see dsh/register.yml — note the toolCallTimeoutMs recommendation there.

Remote (Calibre on another machine): start HTTP mode on that machine, then point any streamable-http client at it:

python ebook_translator_mcp.py --transport http --port 8420
# endpoint: http://<that-machine>:8420/mcp

Tools

Tool

What it does

list_books

List every cached book: engine, languages, progress, non-aligned count; keyword filters by title/engine

get_book_info

One book's engine, target language, merge/alignment rule, progress, and the list of non-aligned chunk ids

list_chunks

Lightweight per-chunk status table (no full texts); filter by status (all/untranslated/translated/misaligned) or keyword

get_original

Full original text of one chunk — exactly what the plugin's proofreading panel shows

get_original_to_file

Export one chunk's original to a local file — returns only metadata; the text itself never enters the conversation

get_translation

Full translation of one chunk plus the alignment verdict (yellow_warning = will be highlighted in the UI)

get_translation_to_file

Export one chunk's current translation to a local file (metadata + alignment only) — for offline rework, human review, or migrating to a new cache

write_chunk

Write one chunk's translation; returns alignment state and a warning if the block counts mismatch

write_chunk_from_file

Write one chunk's translation from a local .txt file — pass a path instead of the text: zero content tokens, no truncation/hallucination risk on large chunks; UTF-8 BOM stripped, CRLF normalized to LF, and the stored text is read back and verified in the same call

delete_translations

Clear translations of the given chunks (for rework); originals untouched

For large chunks, prefer the file pipeline: get_original_to_file exports the original to a local file, the agent translates against that file, and write_chunk_from_file stores the result — bulk text never passes through the conversation (no token cost, no truncation or hallucination risk). get_translation_to_file closes the rework loop: export a misaligned translation, fix its block count offline, write it back.

Addressing model

  • book_id is the cache file name, obtained from list_books. Every call echoes book_id + title — check the echo.

  • Segmenting the same book with a different engine / target language / merge setting creates a separate cache (same title, different id). Duplicate titles are flagged duplicate_title; disambiguate by engine / target_lang / merge_length.

  • chunk_id is the database row id: stable forever, but valid only inside its own book. One chunk going wrong never renumbers the others — redo just that chunk (delete_translations + write_chunk).

  • ui_row is the row's display position in the plugin table (for humans to find the row on screen). Never address by it.

Alignment (the yellow highlight)

With merged translation enabled, original and translation must split into the same number of blocks on blank lines (\n\n). If they don't, the plugin highlights the row yellow as "Non-aligned". All read/write tools report:

"alignment": {
  "applicable": true,
  "aligned": false,
  "original_blocks": 17,
  "translation_blocks": 16
}

So an agent can translate, write, and immediately see whether the row would go yellow — and fix it before you ever open Calibre.

  1. list_books → pick the right book_id (watch duplicate_title)

  2. get_book_info → note merge settings and existing non-aligned chunks

  3. list_chunks with status="untranslated" → pick a chunk

  4. get_original → translate it in the chat (keep the block count if merging is on); or get_original_to_file to export it to a file and translate against the file (recommended for large chunks)

  5. write_chunk (or write_chunk_from_file for large chunks — pass a local file path so the text never passes through the chat) → check alignment.aligned in the response, and treat a missing verify_mismatch as "write verified"

  6. Misaligned? Rewrite the chunk (or delete_translations first) until aligned — for large chunks: get_translation_to_file + fix the block count offline + write_chunk_from_file

  7. Repeat until list_chunks with status="misaligned" comes back empty

  8. Human step: reopen advanced mode in Calibre with the same engine/language/merge settings, review, then click Output

Important behaviors

  • Output uses the cache as-is: the plugin's Output step reads whatever translations are in the cache; externally written ones are picked up directly.

  • No live refresh: the advanced-mode table loads once at open. Writes made while it is open are not shown until you reopen it. Also, clicking Save in the UI while the window is open can overwrite externally written rows with stale in-memory data — close the window while an agent is writing in bulk.

  • Settings define the cache file: the cache file name is a hash of book + engine + target language + merge setting. Changing any of these mid-project points at a different cache file.

  • Temporary caches die with the window: if caching is disabled in plugin settings, the cache exists only while the advanced-mode window is open.

Timeouts: "MCP error -32001" but the write actually succeeded

If a write collides with a write lock held by the Calibre UI (any Save/ignore action), the server waits silently — up to ~23s (4 attempts x 5s busy timeout + backoff) — and sends the client nothing meanwhile. Clients whose tool-call timeout is shorter will report -32001: Request timed out first, while the server still completes the write after the lock is released. Two defenses:

  1. Raise the client's tool-call timeout to 60s or more (dsh: toolCallTimeoutMs: 120000, already set in dsh/register.yml).

  2. If you ever see -32001: do not blind-retry the write. Call get_translation first to check whether the translation actually landed; rewrite only if it is missing.

Every lock wait is logged to the server's stderr for diagnosis.

Troubleshooting

Symptom

Cause and fix

list_books finds no caches

Caching is not enabled in plugin settings (or the advanced-mode window was closed and its temp cache vanished). Segment a book in advanced mode first; or point EBOOK_TRANSLATOR_CACHE_DIR at your cache root

Writes land on the wrong book

Same title, multiple caches. Re-check engine / target_lang / merge_length in list_books and stick to one id

Windows: a black console window flashes and the server never starts

The python on PATH is the Microsoft Store stub. Install Python from python.org and use its absolute path in the client config

MCP error -32001 on write_chunk

See the timeouts section — the write probably succeeded; verify with get_translation

Rows show yellow in the plugin

Misaligned chunk: the translation's blank-line block count differs from the original's. Have the agent rewrite that chunk with matching block count

Environment variables

Variable

Meaning

Default

EBOOK_TRANSLATOR_CACHE_DIR

Explicit cache root (highest priority; then the plugin's configured cache_path, then the platform default)

auto-detect

EBOOK_TRANSLATOR_ENGINE_NAME

Engine name recorded next to written translations

MCP

EBOOK_TRANSLATOR_SEPARATOR

Separator used by the alignment check

\n\n

License

MIT

Available Tools

10 tools
delete_translationsA

Clear the translations of the given chunks (for rework); originals and all other fields are untouched. chunk_ids is a list of this book's database cache ids (never change; see list_chunks; valid only inside this book). A chunk that went wrong only needs its own redo — other chunks are not affected. The response echoes book_id and title; verify them.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior4/5

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

Without annotations, the description carries the full burden. It discloses that only translations are cleared, originals and other fields remain, and other chunks are unaffected. It also explains the response behavior. It does not explicitly state that the operation is destructive or irreversible, though 'clear' implies it. This is a minor gap, so a 4 is appropriate.

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?

The description is concise and front-loaded with the core action, followed by essential parameter details, usage scope, and response verification. Every sentence adds value without fluff or repetition.

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 simple two-parameter tool with an output schema and no annotations, the description covers purpose, usage, behavioral effects, parameter semantics, and response expectations. An agent has everything needed to call it correctly.

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 0%, so the description must compensate. It explains chunk_ids in detail (database cache ids, never change, see list_chunks, valid only inside this book). It does not explicitly define book_id, but the context 'this book' makes it clear. This adequately covers both parameters, though book_id could be more explicit.

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?

The description clearly states the action: 'Clear the translations of the given chunks' and specifies the purpose 'for rework'. It distinguishes the tool from siblings by explicitly noting that originals and other fields are untouched, making its scope unambiguous.

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?

Provides clear usage context: it tells when to use (for rework), how to obtain valid chunk_ids via list_chunks, and emphasizes that only the specific chunk needs redo ('other chunks are not affected'). It also instructs the agent to verify the echoed book_id and title in the response.

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

get_book_infoA

Details of one book's cache: engine, target language, merge / alignment rules, progress, and the list of non-aligned (yellow- highlighted) chunk ids.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses what the tool returns (engine, target language, rules, progress, chunk ids) and implies a read-only operation. It does not mention error conditions or side effects, but for a getter this is acceptable; the return contents are well-specified.

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?

The description is a single, well-structured sentence that front-loads the resource ('one book's cache') and lists the exact fields returned. There is no redundancy or wasted words.

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?

The tool has one simple parameter and an output schema (not shown here but referenced), so the description need not detail return format. It lists the key fields an agent would need to know. No essential information is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explicitly explain book_id beyond the parameter name. However, the single parameter is self-evidently an identifier, and the description's focus on 'one book' makes its role clear. It adds minimal semantic value beyond the schema.

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?

The description clearly states the tool retrieves details of one book's cache, listing specific fields: engine, target language, merge/alignment rules, progress, and non-aligned chunk ids. This distinguishes it from sibling tools like list_books (listing books) and list_chunks (listing chunks), making the purpose unambiguous.

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?

The description implies usage for fetching per-book metadata, contrasting with list_books (multiple books) and get_original/get_translation (content retrieval). However, it does not explicitly name alternatives or state when not to use it, so guidance is clear but implicit.

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

get_originalA

Read the full original text of one chunk — identical to what the UI's proofreading panel shows, so the agent sees the same text a human sees. chunk_id is this book's database cache id (never changes; see list_chunks; valid only inside this book — never use it across books). When merged translation is enabled the response includes blocks: the translation's blank-line block count must equal it to be aligned (otherwise the UI highlights the chunk yellow). include_raw=True additionally returns the raw HTML. The response echoes book_id and title — verify it is the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
include_rawNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/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 behavioral burden and does so well. It discloses that the response mirrors the UI panel, that chunk_id is a never-changing database cache id, that it is only valid within the book, that merged-translation responses include blocks with alignment implications, that include_raw returns raw HTML, and that the response echoes book_id and title for verification. This is exceptional transparency.

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 adds meaningful information: main purpose, parameter semantics, cross-book warning, merged-translation alignment caveat, raw HTML option, and response verification. The description is front-loaded with the core purpose and then layers caveats logically. No filler is present.

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?

Given the tool complexity and the absence of annotations, the description covers all critical context: what the tool returns, how to obtain a valid chunk_id, the cross-book invalidity caveat, the interaction with merged translations, the optional raw HTML flag, and verification of the returned book. The presence of an output schema means detailed return-field explanation is unnecessary.

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 description coverage is 0%, so the description must compensate. It thoroughly explains chunk_id semantics, the meaning and effect of include_raw, and notes that book_id/title are echoed for verification. The only minor gap is that book_id itself is not directly defined, though its role is inferable from the sibling list_books tool.

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?

The description opens with a specific verb and resource: 'Read the full original text of one chunk.' It also clarifies this is the exact text the human UI proofreading panel shows, which clearly distinguishes it from translation-related tools like get_translation. The purpose is immediately unambiguous.

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?

The description gives clear context on when to use the tool: when the full original text of a chunk is needed. It also instructs the agent to obtain chunk_id via list_chunks and warns that the ID is scoped to the current book. It stops short of explicitly naming alternatives or saying when not to use it, but the usage context is strong.

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

get_original_to_fileA

Export one chunk's original text to a local file and return only metadata — the text itself never enters the conversation (zero content tokens, no truncation risk on huge chunks). Mirrors get_original (same metadata fields, same stripped text as the UI proofreading panel shows) and is the symmetric counterpart of write_chunk_from_file: originals flow cache -> file, translations flow file -> cache, bulk text never passes through the agent.

Typical use: the first pass of a formal translation workflow — export the original to a file, translate against the file, write the result back with write_chunk_from_file. For ad-hoc inspection prefer get_original directly.

File handling: UTF-8 without BOM, LF line endings. Missing parent directories are created automatically (creating a directory destroys nothing; the resolved path is echoed as exported_file). An existing file is NOT overwritten unless overwrite=True — a mistyped path must never silently destroy an existing file (e.g. a finished translation draft). After writing, the file is read back and verified; verify_mismatch appears only if it differs. Relative paths resolve against the server process's working directory, which may differ from the caller's — absolute paths are strongly recommended. chunk_id is this book's database cache id (see list_chunks); the response echoes book_id and title — verify it is the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
file_pathYes
overwriteNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: zero content tokens, UTF-8 without BOM/LF, auto-created parent directories, no overwrite unless overwrite=True, post-write read-back verification with verify_mismatch, and a relative-path warning. This is far beyond what annotations would supply.

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?

Well-structured into purpose, typical use, and file handling sections with the key point front-loaded. It is dense and slightly repetitive on the 'text never passes through the agent' idea, but virtually every sentence carries actionable information.

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?

An output schema exists, so return values need little explanation, yet the description still flags exported_file and verify_mismatch. Combined with the file-handling and safety details and absent annotations, an agent has everything needed to invoke it correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and it does: file_path resolution behavior and the absolute-path recommendation, the overwrite default and its safety rationale, chunk_id's meaning as the book's cache id (pointing to list_chunks), and book_id/title echoing for verification. All four params gain meaning.

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+resource+scope: export one chunk's original text to a file and return only metadata, explicitly noting the text never enters the conversation. It also names the siblings it mirrors (get_original) and counterparts (write_chunk_from_file), so an agent can place it precisely without opening schemas.

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 an explicit typical workflow (first pass of a formal translation flow), names the alternative for ad-hoc inspection (get_original), and contrasts its direction against write_chunk_from_file. When-to-use and when-not-to-use are both covered.

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

get_translationA

Read the full translation and alignment state of one chunk — identical to what the UI's proofreading panel shows. chunk_id is this book's database cache id (never changes; see list_chunks; valid only inside this book — never use it across books). translation is null when the chunk is untranslated. When merged translation is enabled the response carries the alignment verdict (whether translation and original have equal blank-line block counts, i.e. whether the UI highlights the row yellow). The response echoes book_id and title — verify it is the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden. It explains that translation is null for untranslated chunks, that the alignment verdict appears only when merged translation is enabled, and that the response echoes book_id and title. This covers key behavioral quirks well, though it does not fully address error or edge conditions.

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?

The description is five sentences, each carrying a distinct useful fact, with the purpose front-loaded. Parentheticals add explanatory value rather than padding, though the overall text is dense and could be tightened slightly.

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 two-parameter tool with no annotations and an output schema, the description covers parameter provenance, null behavior, conditional alignment verdict, and response verification. It could be more explicit about when to prefer this over sibling tools, but it is largely 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?

Schema coverage is 0%, so the description must add parameter meaning. It thoroughly explains chunk_id as a stable, book-scoped cache id obtained from list_chunks and never reused across books. It gives less direct guidance on book_id, but the verification note about the echoed book_id partially compensates.

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?

The description states a specific read operation on one chunk and names the data returned: full translation and alignment state. It clearly distinguishes this tool from siblings like get_original (source text) and write_chunk (write operation).

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?

The description gives clear context for correct use: chunk_id comes from list_chunks, is book-scoped, and must never be reused across books. It also advises verifying book_id against the echoed response. It does not explicitly name when to avoid this tool in favor of a sibling, but the context is strong enough for selection.

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

get_translation_to_fileA

Export one chunk's current translation to a local file and return only metadata — the text itself never enters the conversation. Mirrors get_translation (same metadata and alignment fields, same stripped text as the UI proofreading panel shows).

Typical uses:

  • Rework a yellow (misaligned) chunk without any bulk text through the agent: export the translation, fix the block count offline (editor or script — deterministic, zero tokens), write it back with write_chunk_from_file.

  • Migrate translations after changing engine / target language / merge settings (the plugin then creates a new cache file): export every chunk from the old cache, write them into the new one.

  • Hand the current draft to a human reviewer, or archive a book's translations as plain text.

The chunk must already have a translation (status translated); exporting an untranslated chunk is an error. File handling is the same as get_original_to_file: UTF-8 without BOM, LF; missing parent directories are created automatically; an existing file is not overwritten unless overwrite=True; the file is read back and verified (verify_mismatch appears only on mismatch). Relative paths resolve against the server process's working directory — absolute paths recommended. chunk_id is this book's database cache id (see list_chunks); the response echoes book_id and title — verify it is the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
file_pathYes
overwriteNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

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 behavioral burden and does so thoroughly: error on untranslated chunks, UTF-8 without BOM with LF endings, automatic creation of missing parent directories, no overwrite unless overwrite=True, read-back verification with verify_mismatch on mismatch, and relative paths resolving against the server process CWD. It also discloses that the response echoes book_id and title for identity verification.

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?

The core action is front-loaded in the first sentence, and the bulleted uses keep the middle scannable. The parenthetical 'same metadata and alignment fields, same stripped text as the UI proofreading panel shows' is dense, and the file-handling paragraph packs several facts into one long sentence, but nothing is truly wasted.

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?

An output schema exists, so return values needn't be enumerated, and the description still flags verify_mismatch and the echoed fields. Combined with the precondition, file-format, and path-resolution details, an agent has everything needed to call this correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must supply all parameter meaning, and it largely does: chunk_id is defined as this book's database cache id with a pointer to list_chunks, file_path semantics (absolute recommended, relative resolved against server CWD) are explained, and overwrite's default-True/False behavior is stated. book_id is only indirectly covered via the echo-and-verify instruction, which is a minor gap but readable in context.

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?

The description gives a specific verb and resource ('Export one chunk's current translation to a local file') and immediately clarifies the key scope distinction: only metadata returns, the text never enters the conversation. This cleanly separates it from the sibling get_translation, which returns the text itself, and it names get_original_to_file for the shared file-handling model.

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?

Three concrete 'typical uses' scenarios (reworking a misaligned chunk offline, migrating translations after engine/language changes, handing drafts to reviewers) make the when-to-use unambiguous, and the round trip is explicitly routed to write_chunk_from_file. The precondition 'The chunk must already have a translation (status translated)' plus the note that exporting an untranslated chunk is an error covers the when-not-to-use case.

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

list_booksA

List all cached translation books with progress (including temporary caches). The returned id is the book_id used by every other tool. Note: segmenting the same book with different engine / target language / merge settings produces multiple caches (same title, different ids) — duplicate titles are flagged duplicate_title=true; disambiguate by engine/target_lang/merge_length and pick one, since picking the wrong book makes every later read/write land on the wrong cache. keyword fuzzy-filters by title/engine/language (useful when there are many books). persistent=false means a temporary cache (destroyed as soon as the advanced-mode window closes).

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it does so thoroughly. It discloses that the list includes temporary caches, explains duplicate cache generation, defines the duplicate_title flag, warns about the consequences of picking the wrong id, and clarifies that persistent=false means the cache is destroyed when the advanced-mode window closes.

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?

The description is information-dense without fluff. It front-loads the core purpose, then introduces caveats and filtering in a logical order. Every sentence adds operational value, including the disambiguation warning and persistence note, making the length justified.

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 discovery/list tool with no annotations, the description provides all essential operational context: what is listed, what the id means, how to handle duplicates, how to filter, and what persistent=false implies. An output schema exists, so the return-value format does not need to be described in prose. The descrption is complete for correct tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only provides the keyword property with a default and no description, so schema coverage is 0%. The description fully compensates by explaining that keyword fuzzy-filters by title/engine/language and is useful when there are many books. This goes well beyond the bare schema.

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?

The description uses a specific verb and resource: 'List all cached translation books with progress'. It clearly distinguishes this tool from siblings by emphasizing it returns the book_id used by every other tool, and adds the important disambiguation context about duplicate titles and cache variants.

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?

The description clearly explains the primary use case: discover books and retrieve the book_id that all other tools depend on. It also gives practical guidance on using keyword to filter and on disambiguating duplicates. It does not explicitly name sibling alternatives or state when not to use the tool, so it stops 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.

list_chunksA

Lightweight list of every chunk id of one book with status, without full texts (to keep context small); mirrors the left-hand table of the UI. status options: all / untranslated / translated / misaligned (the UI's yellow rows); keyword fuzzy-matches original or translation text. Each item contains: chunk_id (for addressing; never changes; valid only inside this book), ui_row (UI display position, human reference only), status, alignment, block count, character count and a one-line preview. Always address chunks as book_id + chunk_id — never use ui_row, and never carry this book's chunk_id over to another book. The response echoes book_id and title so the caller can verify it is working on the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
statusNoall
book_idYes
keywordNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses it returns specific fields, that it is lightweight (no full texts), and warns about addressing scope. It doesn't explicitly state read-only or rate limits, but the read-only nature is implied by 'list'. It adds good behavioral context beyond a simple verb.

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?

The description is a single block but well-structured, front-loading the purpose and then detailing parameters and output. It is slightly long but every sentence contributes—no filler. The addressing warning is critical and earns its place.

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 listing tool with an output schema, the description covers purpose, parameters, output fields, and critical usage constraints. It doesn't explain the output format (handled by schema) or mention pagination, but it is complete enough for an agent to call it correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains book_id (required, scopes the list), status (enum-like options: all/untranslated/translated/misaligned), and keyword (fuzzy-match on original or translation). It also clarifies the meaning of returned fields like ui_row and chunk_id, adding value well beyond the bare schema.

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?

The description clearly states the tool's function: a lightweight list of chunk ids for one book, with status, without full texts. It explicitly distinguishes from siblings like get_book_info and get_translation by focusing on chunk listing and the UI mirror.

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?

The description provides explicit usage guidance: how to filter by status, how keyword matches, and critical addressing rules (use book_id + chunk_id, never ui_row, do not carry chunk_id across books). It also implies when to use this (for overview) versus other tools for full content or mutations.

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

write_chunkA

Write the full translation of one chunk (stripped before writing, matching plugin behavior; engine name and target language are recorded). chunk_id is this book's database cache id (never changes; see list_chunks; valid only inside this book). Right after writing, the tool replicates the UI alignment check and returns the aligned state — mismatched block counts come with a warning (the chunk will be highlighted yellow in the UI), and the stored text is read back and verified (verify_mismatch appears only if it differs). With overwrite=False an existing translation is skipped. The response echoes book_id and title: writing is irreversible, verify it is the intended book first. For very large translations prefer write_chunk_from_file (file-based: zero content tokens, no truncation risk).

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
overwriteNo
translationYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/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 behavioral burden and does so richly: it discloses stripping behavior matching the plugin, the UI alignment check replication, mismatched block count warnings, read-back verification with verify_mismatch, overwrite skip semantics, and above all that 'writing is irreversible' with advice to verify the intended book first.

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 write action, then behavior and the alternative. Dense but every clause conveys something (behavior, verification, warning, alternative); a few phrases like 'matching plugin behavior' are borderline filler but overall efficient for a mutation tool.

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?

An output schema exists, so return values need not be described, and the description still covers the notable return signals (alignment warning, verify_mismatch). For a no-annotation mutation tool the gaps are minor — e.g. no explicit permission/auth context — but the destructive/verification picture is well covered.

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 0%, so the description must compensate and largely does: chunk_id is explained as the book's database cache id that never changes and is valid only inside this book, overwrite=False skipping is described, and translation is characterized as the full chunk translation stripped before writing. book_id receives only indirect coverage via the echoed title/irreversibility note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Write the full translation of one chunk', with additional scope detail (stripped before writing, engine name and target language recorded). It is clear, though it relies on the later sentence to separate it from write_chunk_from_file rather than doing so in the purpose statement itself.

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?

Gives explicit conditions: 'With overwrite=False an existing translation is skipped' and 'For very large translations prefer write_chunk_from_file'. It also points to list_chunks for the chunk_id. It lacks an explicit when-not-to-use statement, but the alternative routing is clear.

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

write_chunk_from_fileA

Write one chunk's translation from a local text (.txt) file — the recommended path for large translations. The agent passes only a file path, never the content: zero token cost for the text and no risk of truncation or mutation in transit. Whatever is in the file is exactly what gets stored (the local file is the source of truth, the cache is the mirror).

File handling: the file must exist and be valid UTF-8. A UTF-8 BOM is stripped automatically; leading/trailing whitespace is stripped exactly like write_chunk; and — with the default LF-based alignment separator — CRLF/CR line endings are normalized to LF (text stored with CRLF could never match an LF separator and every multi-block chunk would be flagged misaligned). If the configured separator itself contains CR, line endings are preserved verbatim instead. Empty or whitespace-only files are rejected. Relative paths resolve against the server process's working directory, which may differ from the caller's — absolute paths are strongly recommended (the resolved path is echoed back as source_file so mismatches are visible).

The response has the same structure as write_chunk (written / characters / alignment / progress / warning), plus source_file. After writing, the stored text is read back and compared inside this tool: if verify_mismatch is present (true), the stored text differs from the file — do not trust the write; inspect with get_translation and retry. overwrite=False skips chunks that already have a translation. chunk_id is this book's database cache id (see list_chunks); the response echoes book_id and title — verify it is the intended book.

ParametersJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
file_pathYes
overwriteNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden — and it does: BOM stripping, whitespace stripping, CRLF/CR normalization conditional on the separator, rejection of empty files, relative-path resolution against the server CWD, read-back verification with verify_mismatch, and overwrite semantics. This is unusually rich behavioral disclosure for a mutation tool.

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 purpose and value, then organized into file handling, response, and parameter notes. It is long, but nearly every clause carries actionable constraint information rather than filler; the length is defensible for a 0%-coverage 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?

Given four parameters, no annotations, and a genuinely complex file/encoding/alignment contract, the description supplies everything an agent needs: input preconditions, normalization rules, failure signal (verify_mismatch), and idempotency behavior. It even explains the response shape despite an output schema existing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it covers all four parameters: file_path (must exist, valid UTF-8, path resolution rules), overwrite (skips already-translated chunks), chunk_id (this book's database cache id, cross-referenced to list_chunks), and book_id (echoed back for verification).

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, resource, and input source: write one chunk's translation from a local .txt file. It immediately distinguishes itself from the sibling write_chunk by naming the file-based path and its recommendation for large translations.

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 frames when to prefer this over the inline alternative ('the recommended path for large translations') and the zero-token/truncation rationale. It also gives operational conditions: absolute paths strongly recommended, overwrite=False skips existing translations. It stops short of a formal when-not-to-use rule routing back to write_chunk.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.3.0
    • Addedget_original_to_file
    • Addedget_translation_to_file
    • Addedwrite_chunk_from_file
  2. 7 tool updatesv0.1.0
    • First observeddelete_translations
    • First observedget_book_info
    • First observedget_original
    • First observedget_translation
    • First observedlist_books
    • First observedlist_chunks
    • First observedwrite_chunk

TDQS

A4.4/5.0

Scored across 10 tools

Disambiguation4/5

Each tool has a distinct target, but the set contains deliberate inline/file pairs (write_chunk vs write_chunk_from_file, get_original vs get_original_to_file, get_translation vs get_translation_to_file) that share the same underlying action. The descriptions explicitly differentiate them (token cost, truncation, bulk workflow), so confusion is low, but the overlap is real.

Naming Consistency5/5

All tools use consistent snake_case verb_noun naming (write_chunk, list_books, get_translation, delete_translations). The _to_file/_from_file variants follow a systematic, predictable suffix convention rather than ad-hoc deviations.

Tool Count4/5

Ten tools is well within a reasonable range for a translation cache workflow. The count is slightly inflated because three actions are offered in both inline and file variants, but each variant earns its place by serving a distinct token-budget scenario.

Completeness4/5

The surface covers the core lifecycle: list/get books and chunks, read originals and translations (inline and via file), write translations (inline and from file), and delete translations for rework. Gaps are minor — no book creation/deletion or rename, but those are handled by the plugin rather than the agent.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI agents with research capabilities for local Calibre e-book libraries, including fulltext search across titles, ISBNs, and comments, plus structured excerpt retrieval from books.
    2
    GPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to read and navigate EPUB files through 13 specialized tools for pagination, full-text search, metadata access, and footnote resolution. Supports session-based reading with table of contents navigation and chapter summaries.
    MIT