Skip to main content
Glama

slice_stl

Slice STL or 3MF files into printable G-code or sliced 3MF for the correct Bambu Lab printer model to produce safe output and report plate estimates, filament use, and warnings.

Instructions

Slice an STL or 3MF file using a slicer to generate printable G-code or sliced 3MF. Returns {output_path, plates:[{index, prediction_s, weight_g, filaments:[{type,color,used_g,used_m}], warnings:[{msg,level,error_code}]}]} (plates is empty for G-code output). Each slice writes into its own folder. IMPORTANT: bambu_model must be specified to ensure the slicer generates safe G-code for the correct printer. Call preflight_check first.

Input Schema

NameRequiredDescriptionDefault
scaleNoUniform scale factor applied to all axes. 1.0 = original size, 2.0 = double, 0.5 = half. Applied before slicing.
orientNoAuto-orient the model for optimal printability (minimize supports, maximize bed adhesion). Recommended for raw STL imports that lack a pre-set orientation.
rotateNoRotate the model around the Z-axis (vertical) by this many degrees before slicing. Positive = counterclockwise when viewed from above.
arrangeNoAuto-arrange all objects on the build plate with optimal spacing; STL input is arranged by default. Set false only to keep a 3MF's existing layout: an STL that is not already on the plate then fails to slice.
bed_typeNoBed plate type for slicing (default: textured_plate). SuperTack is rejected for CLI slicing until the BambuStudio CLI identifier is verified.
min_saveNoWrite a smaller output 3MF by omitting non-essential metadata.
rotate_xNoRotate the model around the X-axis by this many degrees before slicing. Useful for reorienting prints for better layer adhesion.
rotate_yNoRotate the model around the Y-axis by this many degrees before slicing. Useful for reorienting prints for better layer adhesion.
stl_pathYesPath to the STL or 3MF file to slice
uptodateNoRefresh 3MF preset configs to match the latest BambuStudio version. Use when slicing downloaded or older 3MF files to prevent stale-config failures.
bambu_modelYesREQUIRED: Bambu Lab printer model. Ask the user if not known. Using the wrong model can damage the printer.
nozzle_typeNoBambu-compatible slicing: the hotend nozzle material installed on the printer (default: BAMBU_NOZZLE_TYPE, else the model preset's stock nozzle, usually stainless_steel).
repetitionsNoPrint N identical copies of the model. Each copy gets its own plate placement. Example: 3 prints three copies.
slice_plateNoWhich plate index to slice. 0 = all plates (default). Use 1, 2, etc. to slice only a specific plate in multi-plate 3MF projects.
slicer_pathNoPath to the slicer executable (default: value from env). Per-call overrides require MCP_ALLOW_EXECUTABLE_ARG=1.
slicer_typeNoType of slicer to use. bambustudio exports a sliced 3MF.
skip_objectsNoSkip specific objects during slicing by index. Comma-separated, e.g. '3,5,10'. Useful for multi-object 3MFs where you only want to print some parts.
template_dirNoOptional template directory override when resolving template_name.
clone_objectsNoClone the loaded model: total copies as a single integer, e.g. '3'. The Bambu-style CLIs count copies per input file and this tool loads one file, so a comma-separated list is rejected by the slicer.
ensure_on_bedNoDetect models floating above the bed and lower them onto the build surface. Safety net for imported models with incorrect Z origins.
template_nameNoOptional named template from the local registry. Resolves to template_3mf_path automatically.
allow_mix_tempNoAllow filaments with different temperature requirements on the same plate. Required for multi-material prints mixing e.g. PLA and PETG.
load_filamentsNoOverride filament profiles. Semicolon-separated paths to filament JSON configs, e.g. 'pla_basic.json;petg_cf.json'.
slicer_profileNoPath to an optional process profile/config file. The exact bambu_model/nozzle machine preset is still required.
nozzle_diameterNoNozzle diameter in mm (default: 0.4)
enable_timelapseNoInsert timelapse parking moves into gcode. The toolhead parks at a fixed position each layer for camera capture. Adds ~10% print time.
filament_coloursNoOptional 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.
filament_profileNoCompatibility alias for load_filaments. Semicolon-separated Bambu filament profile JSON paths.
project_settingsNo3MF 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_idsNoMap filaments to objects/parts. Comma-separated IDs matching load_filaments order, e.g. '1,2,3,1' assigns filament 1 to objects 0 and 3.
template_3mf_pathNoOptional template 3MF whose embedded Bambu slicer settings should be reused when slicing a new STL or 3MF.
nozzle_volume_typeNoBambu-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_gcodesNoStrip custom start/end gcodes embedded in the 3MF. Recommended for downloaded 3MFs since custom gcodes from other users' profiles may be unsafe for your printer model.
use_printer_filamentsNoDefault 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. Template 3MF process settings can still be used at the same time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.44

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does add meaningful context: each slice writes into its own folder, the return structure includes plates, warnings, filament usage, and G-code output has empty plates. It also highlights printer-model safety and preflight ordering, though it does not cover overwrite behavior, permissions, or failure modes beyond the warnings structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the operation and output shape, then gives the critical safety and preflight instructions. The return-shape sentence is dense but earns its place because no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 34-parameter tool with no annotations and no output schema, the description supplies the missing return-value explanation and key safety/preflight context. It is not fully complete on sibling selection and edge-case behavior, but it covers the most important operational gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameter meanings are already fully documented in the schema. The description reinforces that bambu_model is required and safety-critical, but does not add substantive semantics for the 34 parameters beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: slice an STL or 3MF file to generate printable G-code or sliced 3MF. That is clear enough for an agent to understand the core operation, but it does not explicitly distinguish this tool from the sibling slice_with_template or open_in_slicer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives useful prerequisites: call preflight_check first and specify bambu_model to avoid unsafe G-code. However, it does not say when to choose this tool over slice_with_template, open_in_slicer, or other related slicing/project tools, leaving alternative selection implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.