Import a file
import_documentImport a file you have as a new Lilia document: .tex, .md or .lml as text; .docx, an Overleaf project .zip, a .pdf, or a scanned page as .jpg or .png (a photo of handwritten maths notes) as base64. Up to 10 MB. A zip's \input files are read as one document, its images and .bib kept with it. Lilia's importer runs as for a dropped file (no review step). Text, Word and zip files answer at once with the new document's id and address. A PDF or an image is read into LaTeX by Lilia's maths OCR, which takes up to about two minutes: the reply is an importId at once; call import_status with it every 10 to 20 seconds until it says done (the document) or failed (the reason). PDFs and images use the author's plan's monthly PDF pages (an image counts as one page), not the day's connector actions; a refusal says which limit and what is left. Then get_outline, check_document. When the file is with the author rather than with you, use start_import.
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": {
"filename": "<filename>",
"content": "<content>"
},
"name": "import_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Optional: tex, docx, md, lml, pdf or image. | |
| content | Yes | The file: its text for .tex, .md and .lml; base64 for .docx, .zip, .pdf, .jpg and .png (a data: prefix is fine). | |
| filename | Yes | The file name, e.g. paper.tex, thesis.docx, notes.md, notes.lml, paper.pdf, notes-scan.jpg. Its extension gives the format unless format is set. |