iterate_design
Generate, validate, and automatically refine a 3D model until it passes printability checks or reaches the iteration limit; returns the best result for printing.
Instructions
Automated design iteration: generate -> validate -> improve -> regenerate.
Runs a closed loop that generates a model, validates it for
printability issues, and if issues are found, improves the prompt
and regenerates. Stops when the model passes validation or
max_iterations is reached. Returns the best result.
:param prompt: Text description or OpenSCAD code.
:param provider: Generation provider (default ``"openscad"``).
:param max_iterations: Maximum improvement attempts (1-5).
:param material: Optional material for design intelligence.
:param printer_model: Optional printer model for constraints.
:param brief_id: The saved goal's id from ``design_session``, so
the best iteration is recorded against the goal and checked
against it, including against any picture kept on the goal
(``reference_check``). Empty when there is no goal.
:returns: Dict with the best result and iteration history.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": {
"prompt": "<prompt>"
},
"name": "iterate_design"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description or OpenSCAD code. | |
| brief_id | No | The saved goal's id from ``design_session``, so the best iteration is recorded against the goal and checked against it, including against any picture kept on the goal (``reference_check``). Empty when there is no goal. Default: "". | |
| material | No | Optional material for design intelligence. Default: "". | |
| provider | No | Generation provider (default ``"openscad"``). Default: "openscad". | |
| printer_model | No | Optional printer model for constraints. Default: "". | |
| max_iterations | No | Maximum improvement attempts (1-5). Default: 3. |