Slicing Tools
Note: the verified workflow is to slice in Bambu Studio (GUI) and feed the resulting
.gcode.3mftoprint_3mf. The CLI-driven slicing tools below (slice_stl,slice_with_template) work but are sensitive to profile drift and are not the recommended path for production prints. See slicing guide.
list_templates
List saved templates from the local registry directory. You can override the registry root with BAMBU_TEMPLATE_DIR.
{}Each result includes the template name, absolute path, source type, and relative path inside the registry. You can then pass template_name to get_slice_settings, slice_stl, or print_3mf instead of a raw path.
save_template
Copy a local 3mf, json, or .config file into the template registry and register it under a reusable template name.
{
"source_path": "/path/to/sliced_project.3mf",
"template_name": "collars/p1p_petg_default"
}This creates the destination under the template registry directory and makes it available immediately to list_templates, get_slice_settings, slice_with_template, slice_stl, and print_3mf.
get_slice_settings
Inspect the slicer settings embedded in a saved 3MF template or in an extracted JSON/config profile without slicing anything.
{
"template_name": "h2s_template"
}This returns a compact summary of the high-signal settings such as printer preset, default print profile, filament profiles, layer height, infill density, shell counts, support mode, and bed type. It accepts either source_path or template_name. For 3MF inputs it also writes the extracted settings blob to a temp path so the result can be reused directly.
slice_with_template
Slice an STL or 3MF using a named template from the local registry. This is a higher-level wrapper over slice_stl for template-based workflows.
{
"stl_path": "/path/to/model.stl",
"template_name": "collars/p1p_petg_default",
"bambu_model": "p1p"
}This uses the named template as the slicing profile source and still supports live printer filament selection unless you explicitly override load_filaments. The template settings are applied at slice time, and the later print_3mf step computes H2-safe AMS mapping from the newly sliced output.
slice_stl
Slice an STL or 3MF file using an external slicer and return the path to the output file. The output is a sliced 3MF (for BambuStudio, OrcaSlicer, and FULU OrcaSlicer-bambulab) or a G-code file (for PrusaSlicer, Cura, Slic3r).
{
"stl_path": "/path/to/model.stl",
"slicer_type": "bambustudio",
"bambu_model": "p1s"
}slicer_type options: bambustudio, orcaslicer, orcaslicer-bambulab (FULU), prusaslicer, cura, slic3r. Aliases include fulu-orca and orca-studio. When omitted, the value from the SLICER_TYPE environment variable is used (default: bambustudio).
FULU/Orca CLI safety: from 1.1.11, these backends require the exact model/nozzle preset from the selected installation and stop on profile preparation failures. A process override cannot bypass that gate. See configuration and validation limits.
slicer_path and slicer_profile fall back to the SLICER_PATH and SLICER_PROFILE environment variables when omitted. Per-call slicer_path overrides require MCP_ALLOW_EXECUTABLE_ARG=1.
You can provide either template_3mf_path or template_name when you want to slice from a saved template. template_name resolves through the local template registry directory configured for the server.
For printing on a Bambu printer, the recommended workflow is: export a sliced 3MF from your selected Bambu-compatible slicer, then pass that output path to print_3mf.
BambuStudio Slicer Options
When slicer_type is bambustudio (the default), these additional parameters are available on slice_stl:
| Parameter | Type | Description |
|---|---|---|
uptodate | boolean | Update 3MF configs to latest BambuStudio presets |
repetitions | number | Number of copies to print |
orient | boolean | Auto-orient model for optimal printability |
arrange | boolean | Auto-arrange objects on the build plate |
ensure_on_bed | boolean | Lift floating models onto the bed |
clone_objects | string | Clone counts per object, comma-separated (e.g. "1,3,1,10") |
skip_objects | string | Object indices to skip, comma-separated (e.g. "3,5,10") |
load_filaments | string | Filament profile paths, semicolon-separated |
load_filament_ids | string | Filament-to-object mapping, comma-separated |
nozzle_volume_type | string | Installed nozzle flow type: standard or high_flow (default: BAMBU_NOZZLE_VOLUME_TYPE, else the preset's Standard default). high_flow uses the presets' High Flow values, such as the filament's High Flow max volumetric speed, and is refused if the machine preset declares no High Flow variant. Also on slice_with_template. |
filament_colours | string | Slot colours, one #RRGGBB per filament slot, semicolon-separated. Explicit values take priority, followed by input 3MF colours, each custom profile's colour, then the BambuStudio default. |
enable_timelapse | boolean | Enable timelapse-aware slicing |
allow_mix_temp | boolean | Allow mixed-temperature filaments on one plate |
scale | number | Uniform scale factor |
rotate | number | Z-axis rotation in degrees |
rotate_x | number | X-axis rotation in degrees |
rotate_y | number | Y-axis rotation in degrees |
min_save | boolean | Produce smaller output 3MF (faster uploads) |
skip_modified_gcodes | boolean | Ignore stale custom gcodes in the 3MF |
slice_plate | number | Which plate to slice (0 = all plates, default: 0) |
Example: Slice with auto-orient and 3 copies
{
"stl_path": "/path/to/model.stl",
"bambu_model": "p1s",
"orient": true,
"arrange": true,
"repetitions": 3
}Smart Defaults (print_3mf auto-slice)
When print_3mf detects an unsliced 3MF and auto-slices it, these defaults are applied automatically:
uptodate: true-- prevents stale config bugs from downloaded 3MFsensure_on_bed: true-- safety net, lifts floating models onto the bedmin_save: true-- smaller output for faster FTP uploads to the printerskip_modified_gcodes: true-- strips custom gcodes from other users' profiles
These defaults reduce stale-profile problems; inspect downloaded models and their slice preview before printing. When calling slice_stl directly, you have full control over every flag.