Skip to main content
Glama

import_step_file

Convert STEP/STP CAD files into printable meshes: plain solids become STL, while assemblies with colors or multiple parts become a single 3MF that keeps each part's name, position and color.

Instructions

Import a STEP (.step/.stp) CAD file and convert it for Kiln's mesh pipeline.

        Converts STEP files using whichever backend is available (the
        OCCT kernel that ``kiln install-step-backend`` sets up, or an
        existing FreeCAD / Gmsh / CadQuery install).

        **The output format follows what the file carries.**  A plain
        single-solid STEP becomes an STL.  A STEP with part colours or
        several parts (an assembly: each placed part, a part placed
        twice is two) becomes ONE 3MF that keeps each part's name,
        position and colour — so a CAD assembly arrives as its parts,
        ready to print apart or together, instead of one flattened mesh.
        Colours need the OCCT kernel; every backend keeps the parts.
        Pass ``output_format="stl"`` or ``"3mf"`` to force either.

        Use ``check_step_support`` first to verify that a conversion
        backend is installed.  After conversion, use ``diagnose_mesh``
        or ``analyze_mesh_geometry`` to validate the output.

        If this returns ``code="NO_BACKEND"``, read the ``remedy`` field
        rather than guessing: when ``remedy.actionable_by_caller`` is
        True, tell the user to run ``remedy.command`` (``kiln
        install-step-backend``) — one command and it works.  When it is
        False the caller is on a hosted server and has nothing to
        install; say so plainly and suggest ``report_issue``.  Never
        hand a hosted user an install instruction.

        Args:
            brief_id: The saved goal's id from ``design_session``, so this make
                is recorded against the goal and checked against it. Empty when
                there is no goal.
            file_path: Path to the STEP/STP file.
            output_format: ``"auto"`` (default — 3MF when colour or
                multiple bodies are present, else STL), ``"stl"``, or
                ``"3mf"``.
            merge_bodies: Leave unset to follow the format: ``"auto"``
                and ``"3mf"`` keep the parts, ``"stl"`` fuses them into
                one STL.  ``True`` fuses every part into one STL (with
                ``"auto"`` too; refused with ``"3mf"``).  ``False`` keeps
                them apart, one STL per part with ``"stl"``.
            output_dir: Directory for output files.  Defaults to
                the STEP file's parent directory.

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.

MAKE DOORS: design_session, Kiln's front door for making an object, is not installed here (signed in to Kiln it runs on Kiln's servers). On this install compile_scad IS the make → preview → iterate loop: make it, show the preview, iterate.

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": "import_step_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
brief_idNoThe saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: "".
file_pathYesPath to the STEP/STP file.
output_dirNoDirectory for output files. Defaults to the STEP file's parent directory.
merge_bodiesNoLeave unset to follow the format: ``"auto"`` and ``"3mf"`` keep the parts, ``"stl"`` fuses them into one STL. ``True`` fuses every part into one STL (with ``"auto"`` too; refused with ``"3mf"``). ``False`` keeps them apart, one STL per part with ``"stl"``.
output_formatNo``"auto"`` (default — 3MF when colour or multiple bodies are present, else STL), ``"stl"``, or ``"3mf"``. Default: "auto".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.5.1
    • changedInput schema / properties / brief_id / description
      Previous value: -"Default: \"\"."New value: +"The saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: \"\"."
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the STEP/STP file."
    • addedInput schema / properties / merge_bodies / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / merge_bodies / description
      Previous value: -"Default: true."New value: +"Leave unset to follow the format: ``\"auto\"`` and ``\"3mf\"`` keep the parts, ``\"stl\"`` fuses them into one STL.  ``True`` fuses every part into one STL (with ``\"auto\"`` too; refused with ``\"3mf\"``).  ``False`` keeps them apart, one STL per part with ``\"stl\"``."
    • removedInput schema / properties / merge_bodies / type
      Removed value: -"boolean"
    • addedInput schema / properties / output_dir / description
      Added value: +"Directory for output files.  Defaults to the STEP file's parent directory."
    • changedInput schema / properties / output_format / description
      Previous value: -"Default: \"auto\"."New value: +"``\"auto\"`` (default — 3MF when colour or multiple bodies are present, else STL), ``\"stl\"``, or ``\"3mf\"``. Default: \"auto\"."
  2. Changed6 schema fields changedv1.5.0
    • addedInput schema / properties / brief_id
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Brief Id",
      +  "type": "string"
      +}
    • removedInput schema / properties / merge_bodies / default
      Removed value: -true
    • addedInput schema / properties / merge_bodies / description
      Added value: +"Default: true."
    • removedInput schema / properties / output_dir / default
      Removed value: -null
    • removedInput schema / properties / output_format / default
      Removed value: -"auto"
    • addedInput schema / properties / output_format / description
      Added value: +"Default: \"auto\"."
  3. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / output_format / default
      Previous value: -"stl"New value: +"auto"
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds far more: backend fallback order (OCCT / FreeCAD / Gmsh / CadQuery), the actionable_by_caller branch of the NO_BACKEND remedy, that colours require OCCT while parts survive on every backend, and that an inline 3D stage opens on success. It even warns against handing a hosted user an install instruction, which is real behavioral context no annotation carries.

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

Conciseness3/5

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

Purpose and format rules are front-loaded, but the bulk of the Args section duplicates the schema descriptions word for word, and the 'INLINE 3D STAGE' and 'MAKE DOORS' blocks are meta-commentary about viewer hosts and which tool is the make loop, only partially relevant to invoking this tool. Substantial trimming is possible without losing invoking information.

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?

For a conversion tool with branching output formats and a pluggable backend, the description covers the decision rules, the pre- and post-flight tools, the failure mode and its remedy branching, and what the user sees on success. With no output schema present, it supplies enough about returned artifacts and error codes that an agent can act correctly.

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 description coverage is 100%, so the schema already documents every parameter, and the Args section largely restates the schema text verbatim (brief_id, output_format, merge_bodies, output_dir). The only added meaning is outside the Args block — that colours need the OCCT kernel and that merge_bodies=True is refused with "3mf" — so this sits at the baseline rather than above it.

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 and resource ('Import a STEP (.step/.stp) CAD file and convert it for Kiln's mesh pipeline') and then states precisely what the tool emits (STL vs. a multi-part 3MF). The format-follows-content rule lets an agent predict the output without calling the tool, and it is distinguishable from siblings like export_step or step_file_info.

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?

Gives an explicit prerequisite chain ('Use check_step_support first to verify that a conversion backend is installed'), a validation follow-up ('use diagnose_mesh or analyze_mesh_geometry'), and a named error path for code="NO_BACKEND". It also states when to force a format versus leaving it on auto, which is exactly the decision an agent must make before calling.

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