smart_generate_from_template
Generate a print-ready STL from a parametric template, analyze structural risks, auto-apply reinforcements, and infer slicer settings for functional 3D parts.
Instructions
Generate from template + structural analysis + print settings (recommended for functional parts).
Higher-level than ``generate_from_template`` — adds structural risk analysis
and auto-reinforcement. This is the **one-step design-to-print-ready** pipeline:
1. Generates STL from a parametric template (like ``generate_from_template``)
2. Runs structural risk analysis (thin necks, cantilevers, sharp corners)
3. Optionally auto-applies reinforcements (fillets, wall thickening, etc.)
4. Infers optimal slicer settings tuned to the design's structural profile
5. Returns the STL path + recommended settings ready for slicing
The agent can take the output and directly call ``reslice_with_overrides``
or ``run_reslice_and_print`` with the recommended settings.
: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 template_id: Template ID from ``list_design_templates``.
:param parameters: Parameter overrides (e.g., ``{"phone_width": 80}``).
:param material: Filament type for settings inference and for the
reinforcements (PLA, PETG, ABS, etc.).
:param auto_reinforce: If True, auto-apply structural reinforcements.
:param printer_id: The printer the part is for, so the reinforcements
are sized for its nozzle and layer height.
:returns: Dict with STL path, structural grade, reinforcements, and print settings.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": {
"template_id": "<template_id>"
},
"name": "smart_generate_from_template"
}
}Input Schema
| Name | Required | Description | 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 | Filament type for settings inference and for the reinforcements (PLA, PETG, ABS, etc.). Default: "PLA". | |
| parameters | No | Parameter overrides (e.g., ``{"phone_width": 80}``). | |
| printer_id | No | The printer the part is for, so the reinforcements are sized for its nozzle and layer height. | |
| template_id | Yes | Template ID from ``list_design_templates``. | |
| auto_reinforce | No | If True, auto-apply structural reinforcements. Default: false. |