Novel Translation

v0.1.0
io.github.tobiasfong/novel-translation Checked 1 day ago Published 3 days ago

Targeted manuscript access for novel translation, without loading the whole book.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_projects

List registered novels: slug, name, source language, chapter counts per language per volume.

register_project

Register a new novel's Volume 1 (or fix Volume 1's paths). `manuscripts` maps lang -> docx path; every language listed is read from its own docx directly. `source_lang` must be one of its keys. For volume 2+ use add_manuscript_volume.

ParameterTypeDescription
manuscripts *object
name *string
slug
source_langstring
state_dir

add_manuscript_volume

Register volume N's docx for an existing project/language. Volumes restart chapter numbering at 1. Only the given (lang, volume) slot is touched — other volumes are never affected.

ParameterTypeDescription
lang *string
path *string
project *string
volume *integer

list_chapters

Titles + translation status for one volume's chapters (compact — no text). The tool to call when resuming work.

ParameterTypeDescription
langstring
project
volumeinteger

get_chapter

One chapter's text — never the whole manuscript. Master-backed languages read the author's docx directly. Optional paragraph_start/paragraph_end (1-indexed, inclusive) fetch a slice — use for follow-up discussion of specific passages; a full read is only needed for the review-check round. Italics are marked *like this*.

ParameterTypeDescription
number *integer
langstring
paragraph_end
paragraph_start
project
volumeinteger

get_context

Chapter-start bundle in ONE call: full source text + the TAIL of the previous chapter's translation (last `previous_paragraphs` paragraphs, for voice/continuity; crosses volume boundaries) + glossary. Call once per chapter, not per turn.

ParameterTypeDescription
chapter *integer
langstring
previous_paragraphsinteger
project
volumeinteger

search_manuscript

Case-insensitive substring search; returns (volume, chapter) + a short snippet per hit, capped at max_results. Omit `volume` to search every volume. Use this instead of reading chapters to hunt for a term/scene.

ParameterTypeDescription
query *string
langstring
max_resultsinteger
project
volume

get_glossary

Approved glossary + staged terms awaiting human review (clearly separated — staged terms are NOT usable until a human approves them in translation_state.json). Shared across a project's volumes.

ParameterTypeDescription
project

propose_glossary_term

Stage a glossary term for human review. Never auto-commits — approval is a manual edit of translation_state.json, by design.

ParameterTypeDescription
term *string
translation *string
notestring
project

save_translation

Write a chapter's translation + status (draft|reviewed|approved) — ONLY for a (lang, volume) with no master docx. Refuses if a master is registered: the author's docx is the only writable artifact there.

ParameterTypeDescription
chapter *integer
lang *string
text *string
project
statusstring
volumeinteger

record_note

Persist a translation agreement/decision (judgment call, style agreement, JA-authoritative line) to disk so future fresh chats inherit it via get_context. Keep each note to one or two sentences. Pruning is a manual edit of translation_state.json.

ParameterTypeDescription
note *string
chapter
project
volume

lint_chapter

Deterministic mechanical checks on JA prose: orthography (達・何故・貴方 kanji rules), bracket balance + 。before ), non-word watchlist, Latin leakage, 僕 density. Flags only — never rewrites, and never a substitute for actually reading the prose.

ParameterTypeDescription
text *string