Render SVG to image
render_svgRasterize an SVG into a PNG to visually verify layout, alignment, overflow, and colors before shipping.
Instructions
Rasterize an SVG to a PNG and return it INLINE as an image so you can actually SEE the result. Use it right after writing or editing any SVG — a diagram, UI mockup, chart, icon, logo, or badge — to visually verify layout, alignment, overflow, and colors before shipping. Accepts inline markup (svg) or a file (path), and can also save the PNG to disk (outPath).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "render_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | Inline SVG markup. Provide this OR `path`. | |
| path | No | Path to a .svg file. Provide this OR `svg`. | |
| scale | No | Zoom multiplier for the raster (default 1; use 2 for crisp/retina output). | |
| background | No | Background behind the SVG, e.g. '#ffffff' or 'white'. Default: transparent. | |
| outPath | No | If set, also write the rendered PNG to this file path. |