reprint_with_material
Change an existing 3D model's material and print it again, such as PLA to PETG or TPU. It reslices with the new material's settings, checks safety, uploads, and starts the print.
Instructions
Reprint a model with a different material — the slice is set for it.
One-shot convenience tool: reslices the model for the new material
(its temperatures, melt rate and cooling, from the same resolver every
slice uses -- see ``build_material_overrides``), merges any extra
overrides you provide, runs a safety check, uploads to the printer, and
starts the print. The file is labelled and weighed as the new material.
Use this when you want to reprint an existing model in a different
material (e.g. PLA → PETG for outdoor durability, or PLA → TPU for
flexibility). The tool handles all the slicer parameter changes
automatically.
Example: "Reprint my grip extension in PETG instead of PLA"::
reprint_with_material(
file_path="/path/to/grip_extension.stl",
material_id="petg",
printer_name="my_bambu",
printer_id="bambu_a1",
use_ams=True,
ams_mapping="[1]", # PETG is in slot A2 (tray id 1)
)
Requires PrusaSlicer or OrcaSlicer installed locally.
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. Leave unset to let the slicer
choose; a map that does not fit is refused before slicing, as
``slice_model`` refuses it.
file_path: Path to the model file (STL, 3MF, STEP, OBJ).
material_id: Target material (e.g. ``"petg"``, ``"tpu"``).
printer_name: Registered printer name in fleet. If omitted,
uses the default printer.
printer_id: Printer model ID for profile selection
(e.g. ``"bambu_a1"``, ``"ender3"``).
extra_overrides: Optional JSON string of additional slicer
overrides to merge on top of the material defaults
(e.g. ``'{"fill_density": "30%"}'``).
use_ams: Enable AMS filament feeding (Bambu printers).
ams_mapping: JSON string of AMS slot indices (e.g. ``"[1]"``).
Maps each extruder/filament to an AMS tray position.
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.
goal_id: The saved goal from ``design_session`` this model was made
for. The goal then records the material it printed in, and keeps
the one it replaces on its history (``goal_material`` in the
reply). Omitted, the goal named beside the model, if any.
chosen_by: Who picked this material: ``"person"`` when they named it,
``"agent"`` when you proposed it. Kept with the goal's record;
omitted, it is left unsaid.
version_id: The kept design version the model is, when there is one,
so the print lands on that version's history (with ``design_id``
and ``branch_id``).
design_id: The kept design the model belongs to.
branch_id: The design branch the version is on.
in_place_of: The plastic this reprint stands in for (the one asked
for, when it is not loaded): kept with ``material_id`` on the
print's own record.
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": {
"file_path": "<file_path>",
"material_id": "<material_id>"
},
"name": "reprint_with_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal_id | No | The saved goal from ``design_session`` this model was made for. The goal then records the material it printed in, and keeps the one it replaces on its history (``goal_material`` in the reply). Omitted, the goal named beside the model, if any. Default: "". | |
| use_ams | No | Enable AMS filament feeding (Bambu printers). | |
| branch_id | No | The design branch the version is on. | |
| chosen_by | No | Who picked this material: ``"person"`` when they named it, ``"agent"`` when you proposed it. Kept with the goal's record; omitted, it is left unsaid. Default: "". | |
| design_id | No | The kept design the model belongs to. | |
| file_path | Yes | Path to the model file (STL, 3MF, STEP, OBJ). | |
| printer_id | No | Printer model ID for profile selection (e.g. ``"bambu_a1"``, ``"ender3"``). | |
| version_id | No | The kept design version the model is, when there is one, so the print lands on that version's history (with ``design_id`` and ``branch_id``). | |
| ams_mapping | No | JSON string of AMS slot indices (e.g. ``"[1]"``). Maps each extruder/filament to an AMS tray position. | |
| in_place_of | No | The plastic this reprint stands in for (the one asked for, when it is not loaded): kept with ``material_id`` on the print's own record. Default: "". | |
| material_id | Yes | Target material (e.g. ``"petg"``, ``"tpu"``). | |
| 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. Leave unset to let the slicer choose; a map that does not fit is refused before slicing, as ``slice_model`` refuses it. | |
| printer_name | No | Registered printer name in fleet. If omitted, uses the default printer. | |
| 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. | |
| extra_overrides | No | Optional JSON string of additional slicer overrides to merge on top of the material defaults (e.g. ``'{"fill_density": "30%"}'``). | |
| 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. |