Skip to main content
Glama

slice_with_template

Destructive

Slices STL or 3MF files using a named local template to automate repeatable Bambu print workflows. Use it for template-based slicing so saved settings apply without rebuilding them each time.

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.

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": {
      "stl_path": "<stl_path>",
      "template_name": "<template_name>",
      "bambu_model": "<bambu_model>"
    },
    "name": "slice_with_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostNoHostname or IP of the printer (default: value from env)
scaleNoUniform scale factor.
orientNoAuto-orient model for optimal printability.
rotateNoZ-axis rotation in degrees.
arrangeNoAuto-arrange objects on the build plate.
bed_typeNoBed plate type for slicing (default: textured_plate).
min_saveNoProduce smaller output 3MF.
rotate_xNoX-axis rotation in degrees.
rotate_yNoY-axis rotation in degrees.
stl_pathYesPath to the STL or 3MF file to slice
bambu_modelYesREQUIRED: Bambu Lab printer model. Ask the user if not known. Using the wrong model can damage the printer.
bambu_tokenNoAccess token (default: value from env)
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). Printing compares it with the printer's reported nozzle.
repetitionsNoTotal copies of an STL, using clone_objects internally. Do not also pass clone_objects. The slicer may place copies on multiple plates; print_3mf prints one selected plate per call. For 3MF input, select slice_plate explicitly.
slice_plateNoWhich plate index to slice. 0 = all plates.
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. Bambu-compatible choices (bambustudio, orcaslicer, orcaslicer-bambulab) export sliced 3MF; aliases such as fulu-orca and orca-studio are accepted.
bambu_serialNoSerial number (default: value from env)
template_dirNoOptional template directory override when resolving template_name.
ensure_on_bedNoLift floating models onto the bed.
template_nameYesNamed template from the local registry.
load_filamentsNoOverride filament profiles. Semicolon-separated paths to filament JSON configs.
slicer_profileNoExplicit slicer profile/config file. Overrides the named template only when provided in the tool call.
nozzle_diameterNoNozzle diameter in mm (default: 0.4)
pause_at_layersNoPause before each of these layers (1-based, as Bambu Studio and OrcaSlicer number them in the preview), for example to drop in magnets or nuts. The slicer writes the printer's own pause G-code there (M400 U1 on Bambu printers); the printer stops by itself and waits for Resume. Bambu Studio or OrcaSlicer CLI only. Pauses already in a project 3MF are kept.
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.
load_filament_idsNoOptional filament-to-object mapping string.
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. Printing compares it with the printer's reported nozzle flow.
skip_modified_gcodesNoIgnore stale custom gcodes in the 3MF.
use_printer_filamentsNoWhen true, and no explicit slicer profile or load_filaments override is provided, use the printer's current or first loaded AMS filament as the slicer filament profile.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.77
    • changedInput schema / properties / bed_type / description
      Previous value: -"Bed plate type for slicing (default: textured_plate). SuperTack is accepted only for pre-sliced print jobs until the BambuStudio CLI identifier is verified."New value: +"Bed plate type for slicing (default: textured_plate)."
  2. Changed2 schema fields changedv1.1.61
    • addedInput schema / properties / pause_at_layers
      Added value: +{
      +  "description": "Pause before each of these layers (1-based, as Bambu Studio and OrcaSlicer number them in the preview), for example to drop in magnets or nuts. The slicer writes the printer's own pause G-code there (M400 U1 on Bambu printers); the printer stops by itself and waits for Resume. Bambu Studio or OrcaSlicer CLI only. Pauses already in a project 3MF are kept.",
      +  "items": {
      +    "minimum": 2,
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / repetitions / description
      Previous value: -"Number of copies to print."New value: +"Total copies of an STL, using clone_objects internally. Do not also pass clone_objects. The slicer may place copies on multiple plates; print_3mf prints one selected plate per call. For 3MF input, select slice_plate explicitly."
  3. Changed1 schema field changedv1.1.42
    • changedInput schema / properties / bambu_model / enum
      Previous value: -[
      -  "p1s",
      -  "p1p",
      -  "p2s",
      -  "x1c",
      -  "x1e",
      -  "a1",
      -  "a1mini",
      -  "h2d",
      -  "h2s",
      -  "h2c",
      -  "x2d"
      -]New value: +[
      +  "p1s",
      +  "p1p",
      +  "p2s",
      +  "x1c",
      +  "x1e",
      +  "a1",
      +  "a1mini",
      +  "h2d",
      +  "h2dpro",
      +  "h2s",
      +  "h2c",
      +  "x2d"
      +]
  4. Changed2 schema fields changedv1.1.31
    • addedInput schema / properties / nozzle_volume_type
      Added value: +{
      +  "description": "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. Printing compares it with the printer's reported nozzle flow.",
      +  "enum": [
      +    "standard",
      +    "high_flow"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / slicer_type / enum
      Previous value: -[
      -  "bambustudio",
      -  "orcaslicer",
      -  "orcaslicer-bambulab",
      -  "prusaslicer",
      -  "cura",
      -  "slic3r",
      -  "fulu-orca",
      -  "fulu-orcaslicer",
      -  "orca-studio",
      -  "orca-bambulab"
      -]New value: +[
      +  "bambustudio",
      +  "orcaslicer",
      +  "orcaslicer-bambulab",
      +  "orca-slicer-api",
      +  "prusaslicer",
      +  "cura",
      +  "slic3r",
      +  "fulu-orca",
      +  "fulu-orcaslicer",
      +  "orca-studio",
      +  "orca-bambulab"
      +]
  5. Changed1 schema field changedv1.1.22
    • addedInput schema / properties / nozzle_type
      Added value: +{
      +  "description": "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). Printing compares it with the printer's reported nozzle.",
      +  "enum": [
      +    "stainless_steel",
      +    "hardened_steel",
      +    "tungsten_carbide",
      +    "brass"
      +  ],
      +  "type": "string"
      +}
  6. Changed3 schema fields changedv1.1.14
    • changedInput schema / properties / bambu_model / enum
      Previous value: -[
      -  "p1s",
      -  "p1p",
      -  "p2s",
      -  "x1c",
      -  "x1e",
      -  "a1",
      -  "a1mini",
      -  "h2d",
      -  "h2s"
      -]New value: +[
      +  "p1s",
      +  "p1p",
      +  "p2s",
      +  "x1c",
      +  "x1e",
      +  "a1",
      +  "a1mini",
      +  "h2d",
      +  "h2s",
      +  "h2c",
      +  "x2d"
      +]
    • addedInput schema / properties / filament_colours
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / slicer_path / description
      Previous value: -"Path to the slicer executable (default: value from env)"New value: +"Path to the slicer executable (default: value from env). Per-call overrides require MCP_ALLOW_EXECUTABLE_ARG=1."
  7. First observedv1.1.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare non-read-only, destructive, open-world, and non-idempotent behavior, so the description need not restate safety warnings. It adds only that this is a higher-level wrapper around slice_stl; it does not describe output artifacts, overwrite behavior, or template resolution side effects.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the action and followed by the architectural relationship to slice_stl. There is no filler or redundant wording.

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

Completeness3/5

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

For a destructive 30-parameter slicing workflow, the description is minimally sufficient because the schema and annotations carry parameter and safety detail. It omits helpful workflow context such as discovering templates via list_templates and what the slicing operation produces.

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 all 30 parameters, required fields, enums, and defaults are documented in the input schema. The description adds no parameter meaning beyond what is already present in the schema, including for template_name.

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

Purpose5/5

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

The description names the specific action (slice), the resource (STL or 3MF), and the mechanism (named template from the local registry). It also distinguishes itself from sibling slice_stl by identifying itself as a higher-level wrapper for template-based workflows.

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

Usage Guidelines4/5

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

It gives a clear condition for use—template-based workflows—and names the lower-level alternative slice_stl. It does not explicitly state when not to use it or point to list_templates for discovering a valid template_name.

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