export_diagram
Convert an .excalidraw diagram to SVG or PNG image directly from the file, bypassing the need for a browser or Excalidraw app.
Instructions
Export an .excalidraw file to SVG or PNG image.
Converts an existing .excalidraw diagram into a portable image file without requiring a browser or the Excalidraw application.
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": {
"input_path": "<input_path>",
"output_path": "<output_path>"
},
"name": "export_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Resolution multiplier for PNG output (default 2.0 = 2×). Has no effect on SVG output. | |
| format | No | Output format - "svg" (default) or "png". PNG export requires the cairosvg package (``pip install cairosvg``). | svg |
| input_path | Yes | Path to the source .excalidraw file. | |
| output_path | Yes | Destination file path (e.g., "./arch.svg" or "./arch.png"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |