Skip to main content
Glama
riverai

ebook-translator-mcp

by riverai

write_chunk

Writes a translated chunk to a book's cache, verifies alignment and readback, and warns on mismatches so agents can translate ebooks without manual copy-paste.

Instructions

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
book_idYes
chunk_idYes
overwriteNo
translationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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.