Slice with PrusaSlicer
sliceComputes print time, filament use, layer count, and effective settings by slicing STL, 3MF, or OBJ files with PrusaSlicer CLI presets and optional overrides.
Instructions
Slices a model with the PrusaSlicer CLI using the user's selected presets (or the given ones) plus optional overrides, and returns print time, filament grams, layer count, the presets used and the effective key settings. Takes a few seconds to minutes. Writes only to a temp folder. Uses the saved preset files, not unsaved GUI changes. The CLI time estimate differs from the PrusaSlicer window by a few minutes: compare variants with each other, not with the GUI number. The CLI does not auto-orient: use rotate-x/rotate-y to change which side is down.
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": "slice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to an .stl, .3mf or .obj file. | |
| presets | No | Preset names to use instead of the ones selected in PrusaSlicer (user or system presets). Omit to use the selected ones. | |
| overrides | No | PrusaSlicer CLI options to change, as {option: value}, e.g. {"perimeters": 3, "fill-density": "15%", "fill-pattern": "grid", "support-material": true}. Only these options are allowed: perimeters, top-solid-layers, bottom-solid-layers, fill-density, fill-pattern, layer-height, first-layer-height, support-material, support-material-auto, support-material-threshold, brim-width, seam-position, ironing, filament-max-volumetric-speed, infill-speed, perimeter-speed, external-perimeter-speed, rotate, rotate-x, rotate-y, scale. |