validate_openscad_code
Checks OpenSCAD code and returns structured errors and warnings with line numbers, without generating geometry. Use it to verify code before compiling a 3D model, so mistakes surface early with clear line references.
Instructions
Validate OpenSCAD code without generating geometry.
Compiles the code and returns structured error/warning information
with line numbers. Use this to check code before calling
generate_model with OpenSCAD.
:param scad_code: OpenSCAD source code to validate — the same parameter
name ``compile_scad`` / ``analyze_scad_code`` / ``tweak_and_compile_scad``
take, so a session that has been compiling can validate without
learning a second spelling.
:param code: Alias of ``scad_code`` kept for callers that learned it.
:returns: Dict with ``valid``, ``errors``, and ``warnings``.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "validate_openscad_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Alias of ``scad_code`` kept for callers that learned it. Default: "". | |
| scad_code | No | OpenSCAD source code to validate — the same parameter name ``compile_scad`` / ``analyze_scad_code`` / ``tweak_and_compile_scad`` take, so a session that has been compiling can validate without learning a second spelling. Default: "". |