docugen_translate_document
Rewrite a document in the other language ("en" or "pt") with AI, instead of generating it again. Keeps every identifier (RN-01, RF-07, DA-03, AT01...), the Markdown structure, tables, code identifiers and file paths, translates the headings and follows the project glossary (see docugen_get_project). The previous text is saved as a version "Before translation" in the History, where the user can restore it. Does not use the plan quota; at most 20 translations per hour per user, above that it answers rate_limited with the seconds to wait. Refused for documents approved or implemented (the approver approved the other text), being generated, already in that language, or while another API key has an edit session open on it. When the translation drops an identifier or comes back cut, nothing is saved and the call answers validation_error (missingIds lists the identifiers when the key can read documents). Returns the new revision; read the document again before editing it.
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": {
"documentId": "<documentId>",
"language": "<language>"
},
"name": "docugen_translate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | Target language: "en" or "pt" | |
| documentId | Yes | Document id |