insert_into_scad
Insert OpenSCAD code into an existing module without replacing it, adding targeted geometry such as ventilation or screw holes at the start or end.
Instructions
Insert code into an OpenSCAD module without replacing it.
Adds geometry or operations inside a module. Use for targeted
additions like "add ventilation holes to the top panel" or
"add screw holes to the base."
Args:
scad_code: OpenSCAD source code.
module_name: Module to modify (e.g. "base_plate").
code_to_insert: OpenSCAD code to insert.
position: "end" (before closing brace) or "start" (after
opening brace). Default: "end".
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>",
"module_name": "<module_name>",
"code_to_insert": "<code_to_insert>"
},
"name": "insert_into_scad"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| position | No | "end" (before closing brace) or "start" (after opening brace). Default: "end". Default: "end". | |
| scad_code | Yes | OpenSCAD source code. | |
| module_name | Yes | Module to modify (e.g. "base_plate"). | |
| code_to_insert | Yes | OpenSCAD code to insert. |