Save animation
save_animationSaves a rendered SVG or PNG animation to the server output directory and returns its local path for upload, after previews have been reviewed.
Instructions
Save a rendered animation to the server output directory and return its local path.
IMPORTANT: Use this only AFTER iterating on the design with render_animation's preview/filmstrip images. Do not save on the first render.
Input: pass EITHER artifact (id from render_animation, e.g. "art-1" — preferred, no SVG resend) OR content (raw SVG string).
Output file: --<6hex>.<svg|png> inside ANIM_OUTPUT_DIR (/app). The absolute path is returned; pass it unchanged to the wiki upload tool (mediawiki-mcp upload-file).
Safety: this build always rejects unsafe SVG (script, event handlers, external href/url targets, CSS @import) and names the offending element path.
Format: 'svg' (default — the wiki serves it natively, CSS/SMIL animation preserved) or 'png' (raster still).
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": {
"name": "<name>"
},
"name": "save_animation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File-name slug for the animation, e.g. 'bouncing-ball' or 'glycolysis'. | |
| width | No | For png: render width in pixels; defaults to the SVG's declared width. | |
| format | No | 'svg' saves the animation as text (default); 'png' renders a raster still. | svg |
| content | No | Raw SVG to save. Only needed when the content did not come from render_animation. | |
| artifact | No | Artifact id returned by render_animation (e.g. "art-1"). Preferred over content. |