Slice a model
slice_modelSlices 3D models into printer-ready G-code for a single plate, returning print time, material use, cost, warnings, and output file paths.
Instructions
Slice 3D models into printer-ready G-code with Anycubic Slicer Next, running locally.
The main tool for a single plate. For several variants of one model use compare_slices; for a whole folder of parts use plan_project and slice_project. Writes .gcode and .gcode.3mf (send the .gcode.3mf to the printer) to output_dir, replacing files of the same name; takes seconds to a few minutes. Returns print time, grams, cost, layers, per-filament use, the output paths and slicer warnings, which flag overrides the slicer clamped or ignored. It never sends anything to a printer.
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": {
"models": "<models>"
},
"name": "slice_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plate | No | Which plate of a multi-plate 3MF to slice; 0 slices all plates. | |
| scale | No | Uniform scale factor, e.g. 25.4 for a model exported in inches. 0.01 to 100. | |
| copies | No | Copies of each model on the plate, 1 to 200. | |
| models | Yes | Paths to STL, 3MF, OBJ or STEP files, all placed on one plate. | |
| orient | No | Let the slicer auto-orient parts. Prefer find_best_orientation plus rotation_deg. | |
| arrange | No | Let the slicer arrange parts on the plate. Turn off to keep 3MF positions. | |
| printer | No | Printer preset name or a unique part of it, e.g. 'Kobra X'. Omit to use the printer selected in the slicer window. | |
| process | No | Process preset (layer height, speeds), e.g. '0.20mm Standard'. Omit to use the slicer window's selection. | |
| bed_type | No | Plate type, e.g. 'Textured PEI Plate', 'Smooth PEI Plate', 'Cool Plate'. Default: the selected plate. | |
| filaments | No | Filament preset names, one per filament slot, e.g. ['Anycubic PLA']. Omit to use the slicer window's selection. | |
| overrides | No | Setting key to value for this slice only, e.g. {'sparse_infill_density': '20%', 'wall_loops': 3, 'enable_support': true}. Keys come from get_preset. | |
| timeout_s | No | Give up after this many seconds, 30 to 7200. | |
| output_dir | No | Folder for the output files. Default: next to the first model. | |
| output_name | No | Base name for the output files. Default: the first model's name. | |
| rotation_deg | No | Rotation in degrees applied before slicing, e.g. {'x': 90, 'y': 0, 'z': 0}. | |
| filament_colours | No | Multi-colour: '#RRGGBB' for each filament slot, matching the loaded spools. | |
| object_filaments | No | Multi-colour: filament slot (1-based) for each model, in order, e.g. [1, 2]. |