run_reslice_and_print
Slices and prints a model with custom slicer overrides for retries with adjusted settings. Tweak speed, brim, infill, or temperatures, then validate, slice, and start the print in one step.
Instructions
Reslice with custom slicer overrides + print (use for retries with adjusted settings).
Use this when you need to tweak slicer parameters (speed, brim, infill, temps).
For standard prints without overrides, use ``run_quick_print`` instead.
One-shot pipeline: validate mesh → resolve profile with overrides →
slice → safety check → upload to printer → start print.
The overrides parameter is a JSON string of PrusaSlicer INI key-value pairs:
{"brim_width": "8", "perimeter_speed": "30", "fill_density": "25%"}
Common override keys:
Adhesion: brim_width (mm), skirts (count)
Temperature: temperature, bed_temperature (degrees C)
Speed: perimeter_speed, infill_speed, first_layer_speed (mm/s)
Structure: fill_density (%), fill_pattern, layer_height (mm)
Support: support_material (0/1)
Requires PrusaSlicer or OrcaSlicer installed locally.
The printer must be idle and connected.
Args:
model_path: Path to input model (STL, 3MF, STEP, OBJ).
printer_name: Registered printer name in fleet.
printer_id: Printer model ID for auto-profile selection
(e.g. ``"ender3"``, ``"bambu_x1c"``, ``"klipper_generic"``).
overrides: JSON string of PrusaSlicer INI key-value pairs to override.
profile_path: Explicit slicer profile. Overrides printer_id auto-selection.
slicer_path: Explicit path to the slicer binary.
material: Filament material (e.g. ``"PLA"``). It sets the slice's
temperatures, melt rate and cooling -- a setting you also pass in
``overrides`` stays yours -- and its density weighs the print
(omitted: the spool the printer reports loaded, then PLA — the
slice step says which).
For fully-auto raw-gcode reslices, AMS routing prefers a loaded
tray of this material. (3MF plates carry their own filament
map, so routing defers to the adapter there.)
use_ams: Enable AMS filament feeding (Bambu printers). If omitted,
auto-detected from 3MF metadata.
ams_mapping: JSON string of AMS slot indices (e.g. ``"[0, 2]"``).
Maps each extruder/filament to an AMS tray position.
skip_validation: Bypass the mesh-level pre-print validation step.
Defaults to False — designs are pre-tested for printability
before they reach the printer.
placement: Where the part goes when the plate still holds the last
print: ``[x, y]`` in mm, a named region (``"front-left"``,
``"centre"``, …), or ``"keep"``. Omitted, an occupied plate
refuses at the slice step and lists the spots that would work.
preview_token: Token from ``issue_preview_token`` proving this model
was shown to the person before printing. Required beside their
go-ahead: a print is shown to its owner before it starts.INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
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": {
"model_path": "<model_path>"
},
"name": "run_reslice_and_print"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| use_ams | No | Enable AMS filament feeding (Bambu printers). If omitted, auto-detected from 3MF metadata. | |
| material | No | Filament material (e.g. ``"PLA"``). It sets the slice's temperatures, melt rate and cooling -- a setting you also pass in ``overrides`` stays yours -- and its density weighs the print (omitted: the spool the printer reports loaded, then PLA — the slice step says which). For fully-auto raw-gcode reslices, AMS routing prefers a loaded tray of this material. (3MF plates carry their own filament map, so routing defers to the adapter there.) | |
| overrides | No | JSON string of PrusaSlicer INI key-value pairs to override. | |
| placement | No | Where the part goes when the plate still holds the last print: ``[x, y]`` in mm, a named region (``"front-left"``, ``"centre"``, …), or ``"keep"``. Omitted, an occupied plate refuses at the slice step and lists the spots that would work. | |
| model_path | Yes | Path to input model (STL, 3MF, STEP, OBJ). | |
| printer_id | No | Printer model ID for auto-profile selection (e.g. ``"ender3"``, ``"bambu_x1c"``, ``"klipper_generic"``). | |
| ams_mapping | No | JSON string of AMS slot indices (e.g. ``"[0, 2]"``). Maps each extruder/filament to an AMS tray position. | |
| slicer_path | No | Explicit path to the slicer binary. | |
| printer_name | No | Registered printer name in fleet. | |
| profile_path | No | Explicit slicer profile. Overrides printer_id auto-selection. | |
| preview_token | No | Token from ``issue_preview_token`` proving this model was shown to the person before printing. Required beside their go-ahead: a print is shown to its owner before it starts. | |
| skip_validation | No | Bypass the mesh-level pre-print validation step. Defaults to False — designs are pre-tested for printability before they reach the printer. Default: false. |