Import STEP
import_stepUse this when the user wants to start from their own STEP, IGES, native OCCT BREP, STL, OBJ, PLY, 3MF, glTF or GLB file (a part they designed elsewhere, a vendor model). Give exactly one source: url (a public https direct-download link), upload (a file the user attached in ChatGPT), or content_base64 (raw bytes, small files only). Max 50 MB. The format is detected from the bytes or file name (or pass format: 'step' | 'iges' | 'brep' | 'stl' | 'obj' | 'ply' | '3mf' | 'gltf' | 'glb'). STEP, IGES and BREP produce exact B-rep solids; IGES uses OCCT's reader and the shared topology repair pass, while BREP is OCCT's native serialization. A CAD file that does not produce a valid solid fails; it is never replaced by a mesh. STL is imported as faceted geometry. OBJ, PLY, 3MF, glTF and GLB stay source meshes. Writes the file and a starter .kcad.ts into output_dir (default: a fresh temp dir), evaluates it, and returns { ok, format, model_path, script_path, code, bbox, import_report }. The report gives representation, exact_solid, mesh_fallback, repair_required, solid_count, face_count, and triangle_count. Native CAD importers fail if they do not produce an exact solid; they never substitute a mesh. Every mesh format is reported as source-mesh, not as a CAD fallback. Pass script_path as { file } to evaluate_script, add_feature, dfm_review, export and the other tools, or edit code to build on the body. Source meshes are display-only triangle geometry. Use STEP, IGES or BREP when exact CAD topology is required. A non-watertight STL is refused unless allow_open is true.
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": "import_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL that downloads a .step/.stp/.igs/.iges/.brep/.brp/.stl/.obj/.ply/.3mf/.gltf/.glb file directly. | |
| name | No | Base name for the written files. Default 'imported'. | |
| format | No | Override format detection. | |
| upload | No | ChatGPT file reference for a file the user attached. | |
| file_name | No | Original file name, used for format detection. | |
| allow_open | No | STL only: accept a non-watertight mesh as an open shell. | |
| output_dir | No | Where to write the file and starter script. Default: a new temp directory. | |
| content_base64 | No | The file bytes, base64-encoded (small files). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||