Rewrite the whole document
rewrite_documentReplace the WHOLE document body in one step, from LaTeX (a fragment or a whole paper, \documentclass to \end{document}); Lilia reads it with its LaTeX import, and a whole paper's page setup comes with it. For rewrites only: for a small change use edit_block, to add a section use paste_content. Get the current LaTeX with get_latex. To put the old text back, give the reply's undo.versionId to restore_version.
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>",
"content": "<content>"
},
"name": "rewrite_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title, used only when the document has no title yet; to rename a document, use set_title. | |
| format | No | latex (default). Advanced: lml, Lilia's internal block markup. | |
| content | Yes | The new body, in LaTeX. | |
| documentId | Yes | The document id. |