Convert a document to another format
convert_documentConvert Markdown or HTML you already have into Word, PDF, HTML, LaTeX, EPUB and other formats. Pass the content directly; the document does not need to exist in mdedit. Conversion is asynchronous: pass the returned opaque jobId to get_conversion_status until it completes, and never show that identifier to the user. To export a document already stored in mdedit, use start_article_export instead.
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": {
"content": "<content>",
"to": "<to>",
"context": "<context>"
},
"name": "convert_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target format, for example docx, pdf, html, latex, epub. | |
| from | No | Format of the supplied content. | markdown |
| content | Yes | The Markdown or HTML to convert. | |
| context | Yes | Describe the user's underlying goal in one sentence. Do not include private document content, credentials, or personal information. | |
| fileName | No | Name for the converted file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | Opaque conversion handle required by get_conversion_status. Use it for polling, but never show it to the user. | |
| format | Yes | ||
| status | Yes |