Put an image in a figure
add_figure_imagePut an image you have in a figure, from the file itself (a plot or diagram you made, a picture the author gave you): PNG, JPEG or PDF (its first page prints), up to 10 MB, sent as base64. Lilia stores it as the editor's upload does and adds a figure block after afterId (or at the end); with blockId it puts the image in that figure instead, keeping its caption, label and width unless you give new ones. Lilia never fetches a link: send the file. SVG, GIF, WebP and other formats are refused: convert to PNG, or to PDF for a vector drawing. Then check_document.
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>",
"filename": "<filename>",
"contentBase64": "<contentBase64>"
},
"name": "add_figure_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | Optional short description for readers who can't see the image (ACM asks for one). Default: the file name. | |
| label | No | Optional label to refer to it, e.g. fig:results (in text: Figure~(fig:results)). | |
| width | No | Optional width as a fraction of the line, 0.05 to 1 (default 0.8). | |
| afterId | No | Add the new figure after this block id; omit to add it at the end. | |
| blockId | No | Put the image in this existing figure block (from get_outline) instead of adding one. | |
| caption | No | Optional caption. Lilia marks work in it, e.g. @cite{key}. | |
| filename | Yes | The file name, e.g. results-plot.png. The file's own bytes decide its type. | |
| documentId | Yes | The document id. | |
| contentBase64 | Yes | The file as base64 (a data: prefix is fine). |