update_scad_parameter
Update a named numeric parameter in OpenSCAD code without regenerating the model, preserving comments and formatting; derived parameters are refused with guidance to change their source parameters.
Instructions
Update a parameter value in OpenSCAD code.
Finds the named variable declaration and replaces its value,
preserving comments and formatting. Use this to tweak dimensions
without regenerating the entire model. A derived parameter is
refused with a message naming its formula and the parameters to
change instead.
Args:
scad_code: OpenSCAD source code string.
parameter_name: Name of the variable to update.
new_value: New numeric value for the parameter.
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": "update_scad_parameter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_value | Yes | New numeric value for the parameter. | |
| scad_code | Yes | OpenSCAD source code string. | |
| parameter_name | Yes | Name of the variable to update. |