Convert a file
tarkle_convert_fileConverts a file into a NEW file. "to": text (a PDF's text as .txt), images (each page as PNG or JPG in a .zip, up to 30 pages; imageFormat), split (a .zip of PDFs; ranges "each" or "1-3,4-6"), word (the text as a .docx: headings, paragraphs, bullets, tables; layout and pictures are not kept), excel (the tables found by position as a .xlsx; none found is refused), pdf (fileId is a picture, with moreFileIds for more pictures and pageSize fit, a4 or letter; or fileId is ONE Word, Excel or PowerPoint file, converted by LibreOffice in an isolated sandbox, which can take up to about half a minute), ocr (a searchable PDF from a scan; English, up to 8 scanned pages a run), redact (terms: the exact texts to black out, and/or emails true: every page with a match becomes a picture so the text is gone for good; every term must exist; a scan cannot be redacted), compress (level light, medium or strong). pages limits text, images, word, excel, ocr and redact to some pages. Adding or removing a PDF password is NOT available here (a password would pass through the conversation): use the Tarkle API or the chat. The file is never changed: a NEW file is saved next to it (or in folderId) and its fileId is returned; a taken name is refused (NAME_TAKEN). The same function and limits as the Tarkle chat and the API: 40 MB a PDF, a password-protected or damaged PDF is refused with the reason.
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": {
"workspaceId": "<workspaceId>",
"fileId": "<fileId>",
"to": "<to>"
},
"name": "tarkle_convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The kind of file to make. The other fields that apply depend on it; see the tool description. | |
| name | No | Name for the new file. Tarkle sets the right file extension. When omitted, the name is made from the source file's name. | |
| level | No | When converting to compress: how strongly to compress. medium when omitted. | |
| pages | No | Which pages to use, as page numbers and ranges counted from the first page, for example 1-3,5,8-. | |
| terms | No | When converting to redact: the exact texts to black out. Every term must be found in the file. | |
| emails | No | When converting to redact: true also blacks out every email address. | |
| fileId | Yes | A fileId from tarkle_list_files or tarkle_list_bin. | |
| ranges | No | When converting to split: how to cut the PDF, either each (one PDF per page) or ranges like 1-3,4-6. each when omitted. | |
| folderId | No | Folder to save the new file in, from tarkle_list_folders or tarkle_create_folder. Use null for the library root. When omitted, the new file goes in the source file's folder. | |
| pageSize | No | Page size when converting pictures to pdf. fit when omitted. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| imageFormat | No | Picture format when converting to images. png when omitted. | |
| moreFileIds | No | When converting pictures to pdf: more pictures to add after the source, in the order given. Each is a fileId from tarkle_list_files or tarkle_list_bin. | |
| workspaceId | Yes | The workspace's id from tarkle_list_workspaces. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| notes | No |