design_to_gcode_pipeline
Generate an STL, structural risk analysis, weight estimate, and sliced G-code from a natural-language design description in one pipeline call.
Instructions
End-to-end pipeline: description → template → STL → analysis → GCode.
One-call pipeline that:
1. Searches templates for best match
2. Generates STL via OpenSCAD
3. Runs structural risk analysis
4. Estimates weight
5. Slices to G-code (if slicer available)
:param 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.
:param speed_by_height: The person's own speeds for height ranges of the part, only when they
ask for them: a list like ``[{"from_mm": 0, "to_mm": 6, "percent": 50}, {"from_mm": 6,
"speed_mm_s": 120}]`` (millimetres up from the plate; ``to_mm`` left out means to the top;
one speed per range), or ``"kiln"`` to have Kiln choose them from the part's shape (Kiln Pro).
``slice_model`` says what is read back and what is refused.
:param mixed_nozzle_experiment: The person has said yes, for this print, to a slice refused with
``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on
their yes, each time; ``slice_model`` says what follows.
:param soft_nozzle_confirmed: The owner has said to print anyway a slice
refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through
a nozzle on record that is not wear-resistant). Only on their word,
never on your own judgement.
:param filament_map: Only for a printer with more than one nozzle: the
nozzle (1 for the first) each filament prints from, one number per
filament in filament order. Leave unset to let the slicer choose; a
map that does not fit is refused before slicing, as ``slice_model``
refuses it.
:param description: Natural-language design description.
:param output_dir: Directory for output files (uses tempdir if empty).
:param material: Material the slice is set for -- temperatures, melt
rate and cooling -- and weighed as.
:param printer_model: Printer model for slicer profile lookup.
:param infill_percent: Infill percentage for weight estimation.
:returns: Dict with paths to SCAD, STL, G-code files, weight, risks.
:param placement: Where the part goes when the plate still holds the last
print: ``[x, y]`` in mm, a named region (``"front-left"``,
``"centre"``, …) or ``"keep"``. Omitted, an occupied plate refuses at
the slice step and lists the spots that would work.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": {
"description": "<description>"
},
"name": "design_to_gcode_pipeline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal_id | No | 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: "". | |
| material | No | Material the slice is set for -- temperatures, melt rate and cooling -- and weighed as. Default: "PLA". | |
| placement | No | Where the part goes when the plate still holds the last print: ``[x, y]`` in mm, a named region (``"front-left"``, ``"centre"``, …) or ``"keep"``. Omitted, an occupied plate refuses at the slice step and lists the spots that would work. | |
| output_dir | No | Directory for output files (uses tempdir if empty). Default: "". | |
| description | Yes | Natural-language design description. | |
| filament_map | No | Only for a printer with more than one nozzle: the nozzle (1 for the first) each filament prints from, one number per filament in filament order. Leave unset to let the slicer choose; a map that does not fit is refused before slicing, as ``slice_model`` refuses it. | |
| printer_model | No | Printer model for slicer profile lookup. Default: "". | |
| infill_percent | No | Infill percentage for weight estimation. Default: 20.0. | |
| speed_by_height | No | The person's own speeds for height ranges of the part, only when they ask for them: a list like ``[{"from_mm": 0, "to_mm": 6, "percent": 50}, {"from_mm": 6, "speed_mm_s": 120}]`` (millimetres up from the plate; ``to_mm`` left out means to the top; one speed per range), or ``"kiln"`` to have Kiln choose them from the part's shape (Kiln Pro). ``slice_model`` says what is read back and what is refused. | |
| soft_nozzle_confirmed | No | The owner has said to print anyway a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through a nozzle on record that is not wear-resistant). Only on their word, never on your own judgement. Default: false. | |
| mixed_nozzle_experiment | No | The person has said yes, for this print, to a slice refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on their yes, each time; ``slice_model`` says what follows. Default: false. |