scale_mesh_to_fit
Auto-scale an STL mesh to fit a printer’s build volume while preserving aspect ratio, reducing oversized models until they fit.
Instructions
Auto-scale a mesh to fit within a build volume while maintaining aspect ratio.
Useful when a model is too large for your printer -- this uniformly
shrinks it to the largest size that fits.
:param file_path: Path to mesh file (.stl).
:param max_x_mm: Maximum X dimension of build volume.
:param max_y_mm: Maximum Y dimension of build volume.
:param max_z_mm: Maximum Z dimension of build volume.
:param printer_id: Optional printer: a supported model id, or the
name of a printer set up in Kiln. When provided, its recorded
build volume replaces the explicit dimensions.
:param output_path: Output path. Defaults to overwriting input.
:returns: Dict with original/new dimensions and scale factor.INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
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": "scale_mesh_to_fit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_x_mm | No | Maximum X dimension of build volume. Default: 256.0. | |
| max_y_mm | No | Maximum Y dimension of build volume. Default: 256.0. | |
| max_z_mm | No | Maximum Z dimension of build volume. Default: 256.0. | |
| file_path | Yes | Path to mesh file (.stl). | |
| printer_id | No | Optional printer: a supported model id, or the name of a printer set up in Kiln. When provided, its recorded build volume replaces the explicit dimensions. Default: "". | |
| output_path | No | Output path. Defaults to overwriting input. Default: "". |