Export a figure to another format
exportConvert a rendered diagram into PNG, PDF, SVG, draw.io, or Excalidraw by reading its OUT.graph.json receipt, then write the new file beside it or to a chosen path and return its path.
Instructions
Redraw a rendered figure as png, pdf, svg, drawio or excalidraw. It reads the receipt (OUT.graph.json) that render wrote beside the figure, so the figure must have been drawn by this tool. Writes the new file next to it, or at out, and returns the path as a line of text. png and pdf need cairosvg or headless Edge or Chrome. Overwrites an existing file at the same path.
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": {
"path": "<path>"
},
"name": "export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Output format. Default png. | |
| out | No | Where to write the file. Default: beside the figure. | |
| path | Yes | The figure's base path, or its .html or .svg. OUT.graph.json must sit beside it. | |
| layout | No | Page preset for png and pdf: figure (760 px wide, default), wide (1120), slide (1280) or social (1080). |