translate_markdown
Translate Markdown documents while preserving code blocks, HTML, URLs, badges, and table formatting; only headings, paragraphs, taglines, and table cells are translated.
Instructions
Translate a markdown document while preserving its structure. Code blocks, HTML elements, URLs, badges, and table formatting are kept intact. Only prose content (headings, paragraphs, taglines, table cells) is translated. Supports segment-level caching.
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": {
"markdown": "<markdown>",
"from": "<from>",
"to": "<to>"
},
"name": "translate_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target language code or name (e.g., "ja", "Japanese") | |
| from | Yes | Source language code or name (e.g., "en", "English") | |
| model | No | Ollama model (default: "translategemma:27b") | |
| markdown | Yes | The full markdown content to translate | |
| onLostSpan | No | What to do when a protected span (inline code, a protected term such as XLS-30 or Kimi-K3, or an "N of M" count) is missing from a translation: "report" (default) lists it with the result, "fail" makes it an error. | |
| onUntranslated | No | What to do when prose (a sentence of 6 or more words) comes back identical to the English after its one retry: "report" (default) lists it with the result, "fail" makes it an error. |