convert_document
Convert documents between formats like PDF, DOCX, XLSX, PPTX, HTML, and TXT using LibreOffice's conversion capabilities.
Instructions
Convert a document to a different format
Args:
source_path: Path to the source document
target_path: Path where converted document should be saved
target_format: Target format (pdf, docx, xlsx, pptx, html, txt, etc.)
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": {
"source_path": "<source_path>",
"target_path": "<target_path>",
"target_format": "<target_format>"
},
"name": "convert_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_path | Yes | ||
| target_path | Yes | ||
| target_format | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Whether conversion was successful | |
| source_path | Yes | Source document path | |
| target_path | Yes | Target document path | |
| error_message | Yes | Error message if conversion failed | |
| source_format | Yes | Original format | |
| target_format | Yes | Converted format |