preflight_check
Run pre-print safety checks on a 3D printer to confirm it is idle, error-free, at safe temperatures, and holds the expected material or file before starting a print.
Instructions
Run pre-print safety checks to verify the printer is ready.
Checks performed:
- Printer is connected and operational
- Printer is not currently printing
- No error flags are set
- Temperatures are within safe limits
- (Optional) Material loaded matches expected material
- (Optional) Local G-code file is valid and readable
- (Optional) Remote file exists on the printer
- (Optional) For a model file (STL, OBJ, 3MF, STEP, GLB), whether the
part prints: this fails exactly where the print door would refuse the
file, and passes wherever the door would print it.
- Multi-material: what unit the printer carries (AMS, a Klipper MMU)
and, with ``file_path``, whether the file's filaments are loaded.
Advisory for a unit Kiln drives (the print gate decides at start);
a FAILURE when a multi-filament file needs more colours than a
unit Kiln does not drive has loaded — that print comes out wrong
and nothing downstream stops it. Absent for a single-feed printer;
a read that failed is reported as such, never as "no unit".
Args:
file_path: Optional path to a local print file (``.gcode``,
``.gco``, ``.g`` or ``.3mf``) to validate before upload; a model
file (STL, OBJ, STEP) fails the ``file_valid`` check. If
omitted, only printer-state checks are performed.
expected_material: Optional material type (e.g. "PLA", "ABS", "PETG").
If provided and a material is loaded, checks for a mismatch.
remote_file: Optional filename to verify exists on the printer.
If provided, checks the printer's file list for a matching file.
accept_paused: When ``True``, the ``printer_idle`` check accepts
the ``paused`` state in addition to ``idle``. Used by
``start_print(resume_from_paused=True)`` for mid-print
resume 3MFs (which start from a paused-state printer).
Default ``False`` — only ``idle`` is accepted.
start_door_gates_plate: Set by Kiln's own start doors, which judge
the plate themselves (with the resume and print-beside-a-part
exceptions) before they run this check. Leave it unset: then
this check asks the plate question a start would, so it is
answered before the start instead of as a refusal after it.
printer_name: Which printer to check. Omit for the default
printer.
The state, the temperature ceilings and the material profile
all follow the named machine — a readiness verdict is about
one printer, and it has to be the printer that will print.
Call this before ``start_print()`` to catch problems early. The result
includes a ``ready`` boolean and detailed per-check breakdowns.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "preflight_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Optional path to a local print file (``.gcode``, ``.gco``, ``.g`` or ``.3mf``) to validate before upload; a model file (STL, OBJ, STEP) fails the ``file_valid`` check. If omitted, only printer-state checks are performed. | |
| remote_file | No | Optional filename to verify exists on the printer. If provided, checks the printer's file list for a matching file. | |
| printer_name | No | Which printer to check. Omit for the default printer. The state, the temperature ceilings and the material profile all follow the named machine — a readiness verdict is about one printer, and it has to be the printer that will print. | |
| accept_paused | No | When ``True``, the ``printer_idle`` check accepts the ``paused`` state in addition to ``idle``. Used by ``start_print(resume_from_paused=True)`` for mid-print resume 3MFs (which start from a paused-state printer). Default ``False`` — only ``idle`` is accepted. Default: false. | |
| expected_material | No | Optional material type (e.g. "PLA", "ABS", "PETG"). If provided and a material is loaded, checks for a mismatch. | |
| start_door_gates_plate | No | Set by Kiln's own start doors, which judge the plate themselves (with the resume and print-beside-a-part exceptions) before they run this check. Leave it unset: then this check asks the plate question a start would, so it is answered before the start instead of as a refusal after it. Default: false. |