Skip to main content
Glama

import_step_file

Import a STEP CAD file and convert it to STL or colored 3MF for Kiln's mesh pipeline, preserving assembly parts, names, and positions so models arrive ready to print.

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:
            goal_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
goal_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. Changed2 schema fields changedv1.6.0
    • removedInput schema / properties / brief_id
      Removed value: -{
      -  "description": "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: \"\".",
      -  "title": "Brief Id",
      -  "type": "string"
      -}
    • addedInput schema / properties / goal_id
      Added value: +{
      +  "description": "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: \"\".",
      +  "title": "Goal Id",
      +  "type": "string"
      +}
  2. 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\"."
  3. 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\"."
  4. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / output_format / default
      Previous value: -"stl"New value: +"auto"
  5. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false/destructiveHint=false/openWorldHint=false; the description goes well past them by disclosing that files are written to output_dir, that a 3D stage panel may open, that oversized meshes are auto-decimated, that colours require the OCCT kernel, and the exact NO_BACKEND failure shape with a remedy field. The one gap is that no output schema exists and the success return value (paths, mesh counts, format chosen) is never described.

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?

The core is well front-loaded — format contract first, then prerequisites, then error handling — but the Args block duplicates the schema nearly word for word and the appended INLINE 3D STAGE and MAKE DOORS sections balloon the text. The MAKE DOORS section points at compile_scad as the make loop, which is tangential to an import tool and dilutes focus.

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

Completeness4/5

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

For a five-parameter conversion tool with no output schema, the definition covers prerequisites, side effects, format-selection rules, and the primary error path in detail. What is missing is what a successful call returns (file paths, part count, which format was chosen), forcing the agent to infer the result shape.

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 Args section largely restates the schema verbatim, including the merge_bodies and output_format strings already present in the property descriptions. The genuinely additive parameter context is the acknowledgment that merge_bodies=True is refused with output_format='3mf', but even that is duplicated in the schema. Baseline 3 for a fully documented schema.

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?

States a specific verb and resource ('Import a STEP (.step/.stp) CAD file and convert it') and immediately defines the output contract: single-solid STEP becomes STL, assembly/coloured STEP becomes one multi-part 3MF. That distinguishes it from siblings like step_file_info (inspection) and export_step (the reverse direction) without needing their schemas.

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 orders the workflow: run check_step_support first to verify a backend exists, then this tool, then validate with diagnose_mesh or analyze_mesh_geometry. It also gives the when-not path for the NO_BACKEND case, branching on remedy.actionable_by_caller with concrete instructions for both hosted and local callers.

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