Preview SVG
preview_animation_frameRender SVG content or a stored animation artifact to a PNG so the AI can visually inspect the output and iterate. Pass an artifact id to re-preview at a new width without resending SVG.
Instructions
Render SVG content to a PNG image so the AI can visually inspect the output.
When to use:
render_animation already returns a preview image by default; call this tool to re-preview a stored artifact at a different width, or to preview SVG that did not come from render_animation
Stop iterating when the visual result matches the intent
Input: pass EITHER artifact (id from render_animation, e.g. "art-1" — preferred, no SVG resend) OR content (raw SVG string).
Behavior:
Returns a PNG image (base64) rendered from the SVG
Background is transparent by default
CSS animations and SMIL are rendered as a static snapshot (t=0) — motion is not captured
Width:
Omit width to use the SVG's own declared width/viewBox
Pass width to scale the output (useful for small SVGs that need a larger preview)
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": "preview_animation_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Render width in pixels; defaults to SVG's own declared width | |
| format | No | Content format; auto-detected from content if omitted | |
| content | No | SVG string to render as PNG. Only needed when no artifact id exists. | |
| artifact | No | Artifact id returned by render_animation (e.g. "art-1"). Preferred over content. |