smart_reprint
Reprint a 3D model with a different material in one call — finds the file, detects the AMS slot, adjusts slicer settings, and starts printing.
Instructions
Smart one-shot material-switch reprint — finds the model, detects the right AMS slot, adjusts slicer settings, and prints.
This is the highest-level reprinting tool. Give it a file name (or
partial name) and a target material, and it handles everything:
1. **Find the model**: Searches print history for the file name, then
searches common local directories for the source STL/3MF/STEP file.
2. **Check AMS**: Reads AMS tray status to find which slot has the
target material loaded. Auto-selects the matching slot.
3. **Build overrides**: Generates material-specific slicer overrides
(temperature, speed, retraction) for the target material.
4. **Reslice + print**: Reslices the model with new settings and
starts the print with the correct AMS mapping.
Example: "Reprint my grip extension in PETG"::
smart_reprint(
file_name="grip_extension",
material_id="petg",
printer_name="my_bambu",
printer_id="bambu_a1",
)
The tool will find ``grip_extension.stl`` on disk, detect that PETG
is loaded in AMS slot 1, adjust temps/speeds for PETG, reslice, and
start printing — all in one call.
Saved-goal carry-forward: when the source model on disk has a
``<file>.intent.json`` sidecar tagged with a saved goal, that
goal's id is auto-recovered and surfaced as ``brief_id`` in the
result so downstream ``record_print_outcome`` correctly links the
reprint back to the goal. Pass ``brief_id="..."`` explicitly to
override the sidecar derivation (rare — useful for one-off
re-attributions).
Args:
file_name: Full or partial file name to search for (e.g.
``"grip_extension"`` or ``"grip_extension.stl"``).
Searched in print history first, then in local directories.
material_id: Target material (e.g. ``"petg"``, ``"tpu"``).
printer_name: Registered printer name in fleet.
printer_id: Printer model ID for profile selection.
search_dirs: Optional JSON array of extra directories to search
for the model file (e.g. ``'["/home/user/models"]'``).
extra_overrides: Optional JSON string of additional slicer
overrides (e.g. ``'{"fill_density": "30%"}'``).
auto_ams: If ``True`` (default), automatically detect AMS slot
for the target material. Set to ``False`` to skip AMS
detection (useful for non-Bambu printers).
brief_id: Optional saved-goal id from ``design_session``. When
omitted, the source model's intent sidecar (if any) is read
and the saved goal's id is derived from its ``generator``
field — so a reprint of a brief-attached design keeps the
goal link automatically. Best-effort: missing kiln-pro or
missing sidecar silently skips.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_ams | No | ||
| brief_id | No | ||
| file_name | Yes | ||
| printer_id | No | ||
| material_id | Yes | ||
| search_dirs | No | ||
| printer_name | No | ||
| extra_overrides | No |