estimate_print_time
Estimate 3D print time, filament length and weight, and layer count by slicing a model or parsing existing G-code, so you can plan material and time before printing.
Instructions
Estimate print time and filament usage for a model.
Slices the model and parses the G-code for print time, filament
length/weight, and layer count.
For **already-sliced** G-code files, pass the ``.gcode`` path
directly — it will be parsed without re-slicing.
Weight needs a filament density, which lives on a filament
profile; Kiln's bundled profiles describe a PRINTER and name no
filament, so pass ``material`` to get a weight. Without it the
weight is reported as absent rather than guessed — a key missing
from the result means the slicer could not answer it, never that
the answer is zero.
**See also:** ``estimate_material_cost`` for weight and cost from
a mesh with your own price per kg, and ``slice_and_estimate`` for
a fuller analysis with the printability verdict.
:param file_path: Path to STL/3MF/OBJ or .gcode file.
:param profile: Optional slicer profile path.
:param printer_id: Optional printer model ID for bundled profile
(e.g. ``"bambu_a1"``). Used when no explicit profile is given.
:param slicer_path: Optional explicit slicer binary path.
:param material: Optional filament family (``"PLA"``, ``"PETG"``,
…) used only as a density source for the weight.
:returns: Dict with time, filament, and layer estimates.
:param plate_number: Which plate to estimate of a slicer project
that holds several plates (1 for the first). Leave unset for
any other file. A several-plate project with none named is
refused with ``code: "PLATE_NOT_CHOSEN"`` and a list of its
plates: ask the user which plate, then pass it.
:param 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"``. An
estimate never refuses because of the plate: with no safe
spot named the estimate is for the part on an empty plate
and ``plate_note`` says so. Not read for a ``.gcode`` input.
:param 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.
:param 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.
:param 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.
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>"
},
"name": "estimate_print_time"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Optional slicer profile path. Default: "". | |
| material | No | Optional filament family (``"PLA"``, ``"PETG"``, …) used only as a density source for the weight. Default: "". | |
| file_path | Yes | Path to STL/3MF/OBJ or .gcode file. | |
| 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"``. An estimate never refuses because of the plate: with no safe spot named the estimate is for the part on an empty plate and ``plate_note`` says so. Not read for a ``.gcode`` input. | |
| printer_id | No | Optional printer model ID for bundled profile (e.g. ``"bambu_a1"``). Used when no explicit profile is given. Default: "". | |
| slicer_path | No | Optional explicit slicer binary path. Default: "". | |
| 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. | |
| plate_number | No | Which plate to estimate of a slicer project that holds several plates (1 for the first). Leave unset for any other file. A several-plate project with none named is refused with ``code: "PLATE_NOT_CHOSEN"`` and a list of its plates: ask the user which plate, then pass it. | |
| 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. 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. |