run_reslice_and_print
Reslices a model with custom slicer overrides and prints it, letting you retry with adjusted settings such as speed, brim, infill, or temperature.
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:
mixed_nozzle_experiment: The person has said yes, for this print, to a slice refused with
``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only
on their yes, each time; ``slice_model`` says what follows.
soft_nozzle_confirmed: The owner has said to print anyway a slice
refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament
through a nozzle on record that is not wear-resistant). Only on
their word, never on your own judgement. The slice step's
``soft_nozzle`` says which filament goes through which nozzle.
filament_map: Only for a printer with more than one nozzle: the
nozzle (1 for the first) each filament prints from, one number
per filament in filament order (``[2, 1]`` puts filament 1 on
nozzle 2). Leave unset to let the slicer map the filaments. A
map that does not fit the print or the printer is refused before
slicing, as ``slice_model`` refuses it.
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.
version_id: The kept design version the model is, when there is one,
so the print's record lands on that version's history (with
``design_id`` / ``branch_id``, as ``start_print`` takes them).
design_id: The kept design the model belongs to.
branch_id: The design branch the version is on.
in_place_of: The plastic this print stands in for, when it is sliced
for a loaded one instead (a spool-swap choice): kept with
``material`` on the print's own record.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.) | |
| branch_id | No | The design branch the version is on. | |
| design_id | No | The kept design the model belongs to. | |
| 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"``). | |
| version_id | No | The kept design version the model is, when there is one, so the print's record lands on that version's history (with ``design_id`` / ``branch_id``, as ``start_print`` takes them). | |
| ams_mapping | No | JSON string of AMS slot indices (e.g. ``"[0, 2]"``). Maps each extruder/filament to an AMS tray position. | |
| in_place_of | No | The plastic this print stands in for, when it is sliced for a loaded one instead (a spool-swap choice): kept with ``material`` on the print's own record. | |
| slicer_path | No | Explicit path to the slicer binary. | |
| filament_map | No | Only for a printer with more than one nozzle: the nozzle (1 for the first) each filament prints from, one number per filament in filament order (``[2, 1]`` puts filament 1 on nozzle 2). Leave unset to let the slicer map the filaments. A map that does not fit the print or the printer is refused before slicing, as ``slice_model`` refuses it. | |
| 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. | |
| soft_nozzle_confirmed | No | The owner has said to print anyway a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through a nozzle on record that is not wear-resistant). Only on their word, never on your own judgement. The slice step's ``soft_nozzle`` says which filament goes through which nozzle. Default: false. | |
| mixed_nozzle_experiment | No | The person has said yes, for this print, to a slice refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on their yes, each time; ``slice_model`` says what follows. Default: false. |