Skip to main content
Glama

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

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: "".
materialNoMaterial the slice is set for -- temperatures, melt rate and cooling -- and weighed as. Default: "PLA".
placementNoWhere 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_dirNoDirectory for output files (uses tempdir if empty). Default: "".
descriptionYesNatural-language design description.
filament_mapNoOnly 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_modelNoPrinter model for slicer profile lookup. Default: "".
infill_percentNoInfill percentage for weight estimation. Default: 20.0.
speed_by_heightNoThe 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_confirmedNoThe 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_experimentNoThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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 / filament_map
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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.",
      +  "title": "Filament Map"
      +}
    • 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"
      +}
    • addedInput schema / properties / mixed_nozzle_experiment
      Added value: +{
      +  "description": "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.",
      +  "title": "Mixed Nozzle Experiment",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / soft_nozzle_confirmed
      Added value: +{
      +  "description": "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.",
      +  "title": "Soft Nozzle Confirmed",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / speed_by_height
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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.",
      +  "title": "Speed By Height"
      +}
  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 / description / description
      Added value: +"Natural-language design description."
    • changedInput schema / properties / infill_percent / description
      Previous value: -"Default: 20.0."New value: +"Infill percentage for weight estimation. Default: 20.0."
    • changedInput schema / properties / material / description
      Previous value: -"Default: \"PLA\"."New value: +"Material the slice is set for -- temperatures, melt rate and cooling -- and weighed as. Default: \"PLA\"."
    • changedInput schema / properties / output_dir / description
      Previous value: -"Default: \"\"."New value: +"Directory for output files (uses tempdir if empty). Default: \"\"."
    • addedInput schema / properties / placement / description
      Added value: +"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."
    • changedInput schema / properties / printer_model / description
      Previous value: -"Default: \"\"."New value: +"Printer model for slicer profile lookup. Default: \"\"."
  3. Changed10 schema fields changedv1.5.0
    • addedInput schema / properties / brief_id
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Brief Id",
      +  "type": "string"
      +}
    • removedInput schema / properties / infill_percent / default
      Removed value: -20
    • addedInput schema / properties / infill_percent / description
      Added value: +"Default: 20.0."
    • removedInput schema / properties / material / default
      Removed value: -"PLA"
    • addedInput schema / properties / material / description
      Added value: +"Default: \"PLA\"."
    • removedInput schema / properties / output_dir / default
      Removed value: -""
    • addedInput schema / properties / output_dir / description
      Added value: +"Default: \"\"."
    • addedInput schema / properties / placement
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Placement"
      +}
    • removedInput schema / properties / printer_model / default
      Removed value: -""
    • addedInput schema / properties / printer_model / description
      Added value: +"Default: \"\"."
  4. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=false; the description adds real substance on top: it opens an inline 3D stage on success, decimates oversized meshes, refuses at the slice step for MULTI_NOZZLE_MIXED_SIZES, ABRASIVE_ON_SOFT_NOZZLE and an occupied plate, and returns paths plus weight and risks. The one gap is that it never says what happens to partially written files when a later step fails.

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

Conciseness2/5

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

The pipeline steps are front-loaded well, but the bulk of the text duplicates eleven schema parameter descriptions word-for-word, which is pure waste in a tool whose schema already documents every field. The 'INLINE 3D STAGE' and 'MAKE DOORS' sections mix useful behavior with install-specific chatter that dilutes the core instruction.

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 an 11-parameter mutation tool with no output schema, the definition covers the return shape (paths to SCAD/STL/GCode, weight, risks), the refusal conditions, and the placement fallback behavior. Missing only failure/rollback semantics and any notion of whether the pipeline can be resumed via the pipeline_* siblings.

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%, and the description's :param: blocks are essentially verbatim repeats of the schema descriptions, so no additional meaning is conveyed beyond what the schema already provides. Baseline 3 applies when the schema carries the semantics.

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

Purpose4/5

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

The description opens with an explicit pipeline chain (description → template → STL → analysis → GCode) and enumerates the five steps, so the operation and scope are unmistakable. It loses a point because the sibling routing is muddled: the 'MAKE DOORS' paragraph says design_session is the front door (not installed here) and that compile_scad 'IS the make → preview → iterate loop,' which leaves the agent unsure how this pipeline relates to compile_scad.

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

Usage Guidelines3/5

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

There is strong conditional guidance embedded in the parameter docs ('only when they ask for them', 'only on their yes, each time', 'never on your own judgement'), which effectively tells the agent when each option applies. However, there is no explicit statement of when to call this whole pipeline versus compile_scad or slice_model; usage is implied by the step list rather than stated.

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