slice_with_template
Slices STL or 3MF files using a named template from the local registry, returning the output path plus per-plate time, weight, filament use, and slicer warnings for template-based workflows.
Instructions
Slice an STL or 3MF using a named template from the local registry. This is a higher-level wrapper around slice_stl for template-based workflows. Returns the same result: output_path plus per-plate time, weight, filament use and slicer warnings. Call preflight_check first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Hostname or IP of the printer (default: value from env) | |
| scale | No | Uniform scale factor. | |
| orient | No | Auto-orient model for optimal printability. | |
| rotate | No | Z-axis rotation in degrees. | |
| arrange | No | Auto-arrange objects on the build plate. | |
| bed_type | No | Bed plate type for slicing (default: textured_plate). SuperTack is rejected for CLI slicing until the BambuStudio CLI identifier is verified. | |
| min_save | No | Produce smaller output 3MF. | |
| rotate_x | No | X-axis rotation in degrees. | |
| rotate_y | No | Y-axis rotation in degrees. | |
| stl_path | Yes | Path to the STL or 3MF file to slice | |
| bambu_model | Yes | REQUIRED: Bambu Lab printer model. Ask the user if not known. Using the wrong model can damage the printer. | |
| bambu_token | No | Access token (default: value from env) | |
| nozzle_type | No | Bambu-compatible slicing: the hotend nozzle material installed on the printer (default: BAMBU_NOZZLE_TYPE, else the model preset's stock nozzle, usually stainless_steel). | |
| repetitions | No | Number of copies to print. | |
| slice_plate | No | Which plate index to slice. 0 = all plates. | |
| slicer_path | No | Path to the slicer executable (default: value from env). Per-call overrides require MCP_ALLOW_EXECUTABLE_ARG=1. | |
| slicer_type | No | Type of slicer to use. bambustudio exports a sliced 3MF. | |
| bambu_serial | No | Serial number (default: value from env) | |
| template_dir | No | Optional template directory override when resolving template_name. | |
| ensure_on_bed | No | Lift floating models onto the bed. | |
| template_name | Yes | Named template from the local registry. | |
| load_filaments | No | Override filament profiles. Semicolon-separated paths to filament JSON configs. | |
| slicer_profile | No | Explicit slicer profile/config file. Overrides the named template only when provided in the tool call. | |
| nozzle_diameter | No | Nozzle diameter in mm (default: 0.4) | |
| filament_colours | No | Optional slot colours, one #RRGGBB per filament slot in order, separated by ';' (e.g. '#161616;#FFFFFF'). Defaults to the input 3MF's project colours, else the BambuStudio default. | |
| project_settings | No | 3MF input without a slicer profile or template: "keep" slices with the settings the project's creator saved (changed process settings, and each filament mapped to the bambu_model's equivalent preset); "printer_default" uses the printer's default process and filament. When omitted, the user is asked; if the client cannot ask, the call fails and you must ask the user, then pass this. The result's settings_report lists what was kept and not kept. | |
| load_filament_ids | No | Optional filament-to-object mapping string. | |
| nozzle_volume_type | No | Bambu-compatible slicing: the flow type of the nozzle installed on the printer (default: BAMBU_NOZZLE_VOLUME_TYPE, else standard). 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 has no High Flow variant. | |
| skip_modified_gcodes | No | Ignore stale custom gcodes in the 3MF. | |
| use_printer_filaments | No | Default false. When true, a printer is configured, and no explicit slicer profile or load_filaments override is provided, replace the filaments with the printer's current or first loaded AMS filament. |