Save Content
saveSave rendered content to disk as text or raster image. Automatically appends a counter to avoid overwriting files.
Instructions
Save rendered content to disk. Format-aware: can save as text or render to raster image.
IMPORTANT: Use this only AFTER iterating on the design with render and preview. Do not save on the first render. Preview and refine your work first.
Format detection:
'auto' (default): infers format from file extension. .svg saves as text, .png renders to image.
'svg': saves content as a UTF-8 text file
'png': renders the content (assumed SVG) to a PNG image, then saves it
If the file already exists, a numeric counter is appended before the extension to prevent overwriting: design.svg becomes design-1.svg, then design-2.svg. The actual saved path is returned in the response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Content to save. This is typically the output of a render tool such as render_svg. | |
| outputPath | Yes | File path to save to. The directory must already exist. If the file already exists, a numeric counter is appended before the extension: design.svg becomes design-1.svg, then design-2.svg, and so on. The actual saved path is returned in the response. | |
| format | No | Output format. 'auto' infers from file extension (.svg saves as text, .png renders to image). 'svg' saves content as a UTF-8 text file. 'png' renders SVG content to a PNG image before saving. | auto |
| width | No | For raster formats (png): render width in pixels. Defaults to the source content's own declared dimensions. |