export_excalidraw
Export Excalidraw diagrams to PNG or SVG format with pixel-perfect rendering using a headless browser. Supports background, dark mode, and scale options.
Instructions
Export an Excalidraw diagram to PNG or SVG format. Uses a headless browser for pixel-perfect rendering identical to excalidraw.com.
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": {
"inputPath": "<inputPath>"
},
"name": "export_excalidraw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Export scale factor (1, 2, or 3) | |
| format | No | Output format: png or svg | png |
| darkMode | No | Export in dark mode | |
| inputPath | Yes | Absolute path to the .excalidraw file | |
| background | No | Include background color in export | |
| outputPath | No | Output file path. If not provided, uses input path with .png/.svg extension |