validate_and_prepare_mesh
Validate, repair, and analyze a 3D mesh, then check printability and build volume so it is ready for slicing or printing.
Instructions
Full validation pipeline: validate, repair, analyze, and prepare a mesh for printing.
**See also:** ``validate_and_prepare`` for a more comprehensive
10-step pipeline (format, mesh, scale, repair, printability,
structural, bed-fit, material, and cost estimation).
Runs every AI-generated mesh through Kiln's engineering review before
it reaches the slicer or printer. Chains validation → auto-repair →
printability analysis → build volume check into a single quality gate.
**Use this instead of ``validate_generated_mesh`` when you want the
full pipeline** — repair, printability scoring, build volume checks,
and actionable recommendations.
The mesh file may be modified in place if ``auto_repair`` or
``auto_scale`` is enabled. The response includes the final file
path (which may differ from the input if repairs created a new file).
Args:
file_path: Path to an STL, OBJ, GLB, or STEP/STP file.
STEP is converted to a mesh on the way in; if no
converter is installed the call returns ``NO_BACKEND``
with a ``remedy`` — read it rather than guessing whether
the user can fix this (``kiln install-step-backend``) or
is on a hosted server with nothing to install.
material: Filament material for printability analysis (default PLA).
nozzle_diameter: Printer nozzle diameter in mm. Leave unset to
check for the nozzle Kiln has for ``printer_id``.
layer_height: Print layer height in mm (default 0.2).
build_volume_x: Build volume X in mm. Used only when X, Y and
Z are all given; otherwise ``printer_id`` supplies the bed.
build_volume_y: Build volume Y in mm. Used only when X, Y and
Z are all given; otherwise ``printer_id`` supplies the bed.
build_volume_z: Build volume Z in mm. Used only when X, Y and
Z are all given; otherwise ``printer_id`` supplies the bed.
printer_id: Optional supported printer model id. When
provided, printer intelligence supplies the build volume.
auto_repair: Auto-repair non-manifold meshes (default True).
auto_scale: Auto-scale if mesh exceeds build volume (default False).
min_printability_score: A lowest score (0-100) you require,
for every part. Leave unset and the verdict decides: a
part that prints, as it is or with supports, passes;
one that won't print fails; one with no single cause
named is judged against Kiln's own floor.
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": "validate_and_prepare_mesh"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | Filament material for printability analysis (default PLA). Default: "PLA". | |
| file_path | Yes | Path to an STL, OBJ, GLB, or STEP/STP file. STEP is converted to a mesh on the way in; if no converter is installed the call returns ``NO_BACKEND`` with a ``remedy`` — read it rather than guessing whether the user can fix this (``kiln install-step-backend``) or is on a hosted server with nothing to install. | |
| auto_scale | No | Auto-scale if mesh exceeds build volume (default False). Default: false. | |
| printer_id | No | Optional supported printer model id. When provided, printer intelligence supplies the build volume. Default: "". | |
| auto_repair | No | Auto-repair non-manifold meshes (default True). Default: true. | |
| layer_height | No | Print layer height in mm (default 0.2). Default: 0.2. | |
| build_volume_x | No | Build volume X in mm. Used only when X, Y and Z are all given; otherwise ``printer_id`` supplies the bed. | |
| build_volume_y | No | Build volume Y in mm. Used only when X, Y and Z are all given; otherwise ``printer_id`` supplies the bed. | |
| build_volume_z | No | Build volume Z in mm. Used only when X, Y and Z are all given; otherwise ``printer_id`` supplies the bed. | |
| nozzle_diameter | No | Printer nozzle diameter in mm. Leave unset to check for the nozzle Kiln has for ``printer_id``. | |
| min_printability_score | No | A lowest score (0-100) you require, for every part. Leave unset and the verdict decides: a part that prints, as it is or with supports, passes; one that won't print fails; one with no single cause named is judged against Kiln's own floor. |