tweak_and_compile_scad
Tweaks a named OpenSCAD parameter, checks material limits, and recompiles to STL in one step, refusing designs with floating pieces.
Instructions
Update a parameter in OpenSCAD code and recompile to STL.
The complete parametric tweaking workflow: changes a dimension
variable, validates against material limits, and compiles a new
STL — all in one step. Perfect for "make it 5mm wider" requests.
A tweak that leaves a piece floating with nothing under it is
refused like a compile is (``code: "FLOATING_PIECES"``, the fix
in ``error``). ``color`` shows the part in the colour the user
asked for, as on ``compile_scad``.
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.
scad_code: OpenSCAD source code.
parameter_name: Variable name to update (e.g. "wall_thickness").
new_value: New numeric value.
material: Optional material for limit validation (e.g. "pla").
color: The colour the user asked for, shown on the preview and
the stage (a name or ``#rrggbb``). Not a print setting.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": {
"scad_code": "<scad_code>",
"parameter_name": "<parameter_name>",
"new_value": "<new_value>"
},
"name": "tweak_and_compile_scad"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | The colour the user asked for, shown on the preview and the stage (a name or ``#rrggbb``). Not a print setting. Default: "". | |
| brief_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 | Optional material for limit validation (e.g. "pla"). | |
| new_value | Yes | New numeric value. | |
| scad_code | Yes | OpenSCAD source code. | |
| parameter_name | Yes | Variable name to update (e.g. "wall_thickness"). |