Animate layers
animate_layersCreates an animated GIF from a G-code file showing the print building layer by layer, so users can watch or share the build progress. Saves the GIF next to the G-code.
Instructions
Make an animated GIF of the print building up layer by layer.
Use it when the user wants to watch the build or share it; for checking one layer use preview_gcode instead. Writes _layers.gif next to the G-code, replacing an older one. Returns the GIF and its path.
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": {
"path": "<path>"
},
"name": "animate_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a .gcode file on this computer, e.g. one written by slice_model. | |
| size | No | Frame size in pixels, 200 to 1000. | |
| max_frames | No | Most frames in the GIF, 5 to 200; layers are skipped evenly to fit. |