Skip to main content
Glama

design_to_gcode_pipeline

Turns a plain-language design brief into an STL, structural risk report, weight estimate, and sliced G-code in a single 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 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.
: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
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: "".
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.
printer_modelNoPrinter model for slicer profile lookup. Default: "".
infill_percentNoInfill percentage for weight estimation. Default: 20.0.

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 / 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: \"\"."
  2. 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: \"\"."
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, but the description adds genuinely new behavior: slicing is conditional on a slicer being available, an inline 3D stage panel opens on success with automatic mesh decimation, an occupied plate causes a refusal at the slice step with suggested placements, and files are written into `output_dir`. These are side effects an agent cannot infer from the annotations, though the description never states what happens to pre-existing files in `output_dir`.

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 numbered pipeline steps are well front-loaded and the two prose blocks (INLINE 3D STAGE, MAKE DOORS) carry real information. But the docstring-style `:param:`/`:returns:` blocks duplicate the input schema verbatim and inflate length without adding value, and the MAKE DOORS paragraph is digressive about install state.

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?

With seven parameters, no output schema, and a real multi-stage workflow, the description is appropriately complete: it lists the return keys (SCAD, STL, G-code paths, weight, risks), explains conditional slicing, and documents the plate-occupancy rule. The remaining gap is that a mutation tool writing artifacts to disk says nothing about overwrite behavior or whether partial outputs survive a mid-pipeline failure.

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 all seven parameters. The `:param:` blocks largely restate those descriptions verbatim rather than adding new meaning; the only marginal value is the note that weight estimation uses `infill_percent` and that material affects temperatures, melt rate and cooling. Baseline 3 applies since the schema carries the semantic load.

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 names a concrete verb and resource chain — 'End-to-end pipeline: description → template → STL → analysis → GCode' — and enumerates the five stages, so an agent knows exactly what a single call produces. Sibling differentiation is present but muddled: it points at `compile_scad` as the iterate loop and `design_session` as the missing front door, without contrasting against closer siblings like `slice_model`, `generate_and_print`, or `smart_generate_from_template`.

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?

Usage is implied by 'One-call pipeline' and by the step list, and the MAKE DOORS block does name alternatives (`design_session`, `compile_scad`). However it never states a clean selection rule such as 'use this when you want STL + weight + G-code in one shot; use `slice_model` when you already have a mesh', and the note that `design_session` is not installed here leaves it ambiguous whether this tool itself is fully functional.

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