Document and image file conversion
convert_fileConvert office documents and images between formats. Documents (docx, doc, xlsx, xls, pptx, ppt, odt, rtf, html, txt, csv) to pdf, docx, odt, txt, xlsx or csv; images between png, jpg, webp and gif. Use when a user or system needs a file in a different format. Send {url} or {base64}, plus filename (with extension) and to. Returns the converted file. Errors: 400 unsupported pair, 422 conversion failed. Price: $0.02 USDC per call (x402).
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>",
"to": "<to>"
},
"name": "convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target format, e.g. pdf, docx, txt, png, webp | |
| url | No | Public URL of the file. Provide url OR base64. | |
| base64 | No | File contents, base64-encoded (max 20 MB). Provide url OR base64. | |
| filename | Yes | Original filename with extension, e.g. report.docx |