CONVERT_DOCUMENT
Convert a document from one format to another. Supported conversions: PDF→DOCX (preserves layout), PDF→XLSX (extracts tables), DOCX→PDF, XLSX→PDF, DOCX→XLSX, XLSX→DOCX, DOCX→PPTX, XLSX→PPTX. All conversions are cross-platform (pure Python). For PDF→DOCX, formatting and layout are preserved. For →PDF conversions, content is rendered cleanly but complex formatting may differ.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_path | string | yes | Absolute path to the source file |
output_path | string | yes | Absolute path for the converted file (with target extension) |
options | object | — | Optional conversion settings |
How to use it
You normally trigger this by describing what you want in chat — the agent selects CONVERT_DOCUMENT automatically. For example:
In a workflow
As a step in a multi-step workflow DAG:
{
"id": "s1",
"agent": "document_converter",
"action": "CONVERT_DOCUMENT",
"args": {
"input_path": "/Users/me/Documents/file.txt",
"output_path": "/Users/me/Documents/file.txt",
"options": "…"
},
"depends_on": [],
"outputs": []
}Direct call
For scripting, call it directly via POST /execute_tool. Every tool returns { success, message, data }.
curl -X POST http://127.0.0.1:8000/execute_tool \
-H "Content-Type: application/json" \
-d '{"tool_name":"CONVERT_DOCUMENT","args":{"input_path":"/Users/me/Documents/file.txt","output_path":"/Users/me/Documents/file.txt","options":"…"}}'Part of the document_converter plugin. Browse the full Plugin & Tool Catalog or the relevant feature guide.