Skip to main content
Glama

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

NameRequiredDescriptionDefault
file_pathYesPath to the mesh.
output_pathNoWhere 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_ratioNoFraction of the triangles to keep (0.01-1.0). Not read when ``max_megabytes`` is given. Default: 0.5.
max_megabytesNoThe largest the file written may be, in megabytes. Left at 0, ``target_ratio`` decides. Default: 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.6.0
    • changedInput schema / properties / file_path / description
      Previous value: -"Path to the STL file."New value: +"Path to the mesh."
    • addedInput schema / properties / max_megabytes
      Added value: +{
      +  "description": "The largest the file written may be, in megabytes.  Left at 0, ``target_ratio`` decides. Default: 0.",
      +  "title": "Max Megabytes",
      +  "type": "number"
      +}
    • changedInput schema / properties / output_path / description
      Previous value: -"Output path (defaults to ``<name>_simplified.stl``). Default: \"\"."New value: +"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: \"\"."
    • changedInput schema / properties / target_ratio / description
      Previous value: -"Target fraction of original triangles (0.01-1.0). Default: 0.5."New value: +"Fraction of the triangles to keep (0.01-1.0). Not read when ``max_megabytes`` is given. Default: 0.5."
  2. Changed3 schema fields changedv1.5.1
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the STL file."
    • changedInput schema / properties / output_path / description
      Previous value: -"Default: \"\"."New value: +"Output path (defaults to ``<name>_simplified.stl``). Default: \"\"."
    • changedInput schema / properties / target_ratio / description
      Previous value: -"Default: 0.5."New value: +"Target fraction of original triangles (0.01-1.0). Default: 0.5."
  3. Changed4 schema fields changedv1.5.0
    • removedInput schema / properties / output_path / default
      Removed value: -""
    • addedInput schema / properties / output_path / description
      Added value: +"Default: \"\"."
    • removedInput schema / properties / target_ratio / default
      Removed value: -0.5
    • addedInput schema / properties / target_ratio / description
      Added value: +"Default: 0.5."
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare non-read-only, non-destructive, closed-world; the description goes far beyond by disclosing server-side processing, free-tier availability, that the result is measured against the original before any write, that the original is never replaced, and the full failure contract (nothing written, file left as-is, reply explains why). Format handling and the multi-color 3MF refusal are behavior an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and the size-limit mode before the edge-case detail, and most sentences carry real information about limits, notes, and failures. It loses a point because the :param: block restates the input schema almost word for word, which is pure duplication.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the return contract and does so thoroughly: path, triangle counts and reduction percent, watertightness before/after, bounding box and volume change, deviation metrics with the limit, plus note/caution semantics. Nothing an agent needs to call it or explain the result is missing, including the inline stage behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the descriptions are duplicated almost verbatim in the schema, so the parameter block adds little new meaning. The one genuinely useful clarification is the precedence rule between target_ratio and max_megabytes, which is also present in the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb, resource, and outcome: reduce a mesh's triangle count while keeping its shape, for faster slicing or a smaller file. That framing cleanly separates it from the geometry-editing siblings (hollow, mirror, rescale, rotate) without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes between the two modes: pass max_megabytes to hit a size limit, otherwise target_ratio decides (and is not read when max_megabytes is given). It also gives a clear when-not — do not call again with a smaller ratio to force a reduction the limits refused — plus the human-in-the-loop rule to save as a new version only after the person approves.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools