render_and_export_media
Render a stick figure animation to MP4, GIF, WebM, SVG, PNG or SVG sequences, or an interactive HTML player with configurable resolution and frame rate.
Instructions
Renders and exports the active stick figure animation to visual media formats: "mp4" (H.264 video), "gif" (palette-optimized animated GIF), "webm" (VP9 video), "svg" (single frame vector), "animated-svg" (standalone self-playing vector), "png-sequence" (folder of crisp PNG frames), "svg-sequence" (folder of SVGs), or "html-player" (interactive standalone 60fps web player with timeline scrubber controls).
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": {
"outputPath": "<outputPath>",
"format": "<format>"
},
"name": "render_and_export_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Playback frame rate (defaults to document fps) | |
| loop | No | Whether to loop video/GIF animation indefinitely (default: true) | |
| width | No | Output width in pixels (defaults to canvas width) | |
| format | Yes | Export format: "mp4", "gif", "webm", "svg", "animated-svg", "png-sequence", "svg-sequence", or "html-player" | |
| height | No | Output height in pixels (defaults to canvas height) | |
| frameIndex | No | Single frame index to render when format is "svg" (default: 0) | |
| outputPath | Yes | Output file or directory path (e.g. "./renders/battle.mp4", "./stick.gif", "./preview.html", or "./frames") |