simplify_mesh_model
Reduce a mesh's triangle count while preserving shape and key measurements for faster slicing or smaller files; optionally cap output to a maximum file size.
Instructions
Reduce a mesh's triangle count, keeping its shape, for faster slicing or a smaller file.
Kiln's servers do the work, free on every plan: a signed-in
install sends the file and the simplified file comes back to
``output_path``. The result is measured against the original
before anything is written. A closed part stays closed and a
damaged one gains no new damage, and its outline, its volume
and its surface stay within limits set for a part of its size;
the reply carries what was measured and the limit it was held
to (``deviation_limit_mm``).
When the count asked for would break one of those, the fewest
triangles that keep them all are written instead and ``note``
says why: tell the user, and do not call again with a smaller
ratio to force it. When the surface moved enough to matter
for a tight fit, ``caution`` says by how much: pass it on.
When nothing can be removed within the limits, when the file
has more triangles than Kiln's servers simplify at once, or
when the servers cannot be reached (offline, signed out, no
answer), nothing is written, the file is left as it was, and
the reply says why and what to do.
Reads STL, OBJ, GLB, glTF, 3MF and STEP; always writes a binary
STL. A 3MF with more than one color or object is refused,
since the STL would lose them.
To make a model fit a size limit (the largest model a Kiln
account keeps, the largest file a print service quotes), pass
``max_megabytes``: the file written is at most that large, as
close to the original as that allows, or nothing is written and
the reply says how close it came. ``summary`` says the size
before and after and how closely the two look the same: show
it, with the before and after pictures, and save the slimmer
copy as the next version only once the person says yes. The
original is never replaced.
:param file_path: Path to the mesh.
:param target_ratio: Fraction of the triangles to keep (0.01-1.0).
Not read when ``max_megabytes`` is given.
:param max_megabytes: The largest the file written may be, in
megabytes. Left at 0, ``target_ratio`` decides.
:param output_path: Where to write the result. Left empty, it
is named ``<name>_simplified`` and ``path`` says where it
was saved (Kiln's own files folder when the servers made it).
:returns: ``path``; ``original_triangles``, ``asked_triangles``,
``simplified_triangles`` and ``reduction_pct``; whether the
surface was closed before and after (``watertight_before`` /
``watertight_after``) and its open edges; the measured
``bounding_box_change_mm`` and ``volume_change_pct``; and
how far the surface moved: ``max_deviation_mm``,
``typical_deviation_mm``, ``deviation_limit_mm`` and
``deviation_samples`` (how many points were measured).
``note`` and ``caution`` as above. Or an error saying why
nothing was written.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": "simplify_mesh_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the mesh. | |
| output_path | No | Where to write the result. Left empty, it is named ``<name>_simplified`` and ``path`` says where it was saved (Kiln's own files folder when the servers made it). Default: "". | |
| target_ratio | No | Fraction of the triangles to keep (0.01-1.0). Not read when ``max_megabytes`` is given. Default: 0.5. | |
| max_megabytes | No | The largest the file written may be, in megabytes. Left at 0, ``target_ratio`` decides. Default: 0. |