Script API
The kernelCAD script API, grouped by the task you're doing. Every page has an example you can edit and run.
MCP tool reference, inputs, outputs and examples · All KernelCadApi methods
Machine-generated capability coverage inventory
Working on one model in parallel branches? Check the merge before you merge it
- Start a shape The first call in any model: a solid primitive, or a 2D profile to extrude. 53 calls
- Add material Turn a profile into a solid, or grow one along a path. 10 calls
- Remove material Cut into a solid: bolt holes, pockets, slots, plain subtraction. 7 calls
- Combine shapes Merge or intersect solids, or group them without paying for a boolean. 10 calls
- Finish edges Break edges, add draft, hollow out a wall or fill it with a lattice, fold sheet metal. 10 calls
- Select geometry Pick the edges or faces a feature acts on. Query first, then sort or group what comes back. 15 calls
- Place & transform Move a body into position, mirror it, or repeat it. 21 calls
- Assemble Build a mechanism from parts: connectors, mates, joints, posed Scenes. 6 calls
- Curves & surfaces NURBS curves and surfaces, plus the evaluators for measuring them before they become solids. 33 calls
- Measure & verify Ask the kernel what you actually built, and check it before shipping. After dfm_review, dfm_fix_recheck applies one safe shell, fillet, or draft edit and runs that review again. 23 calls
- Parametrize Declare editable dimensions and do arithmetic on them (JS operators throw on a ParamRef). 17 calls
- Import & export Bring in vendor geometry, and write models back out. 2 calls
- Annotate & present Present a model and declare drawing intent without changing its geometry: text, color, lighting, camera, motion, drawing GD&T, and review requirements. 16 calls
Capabilities
- Asset catalogue
- Contact dynamics verification
- Manufacturability review
- Drawings
- Export formats
- Finite element analysis
- Hosted MCP
- Import geometry
- Mates and assemblies
- Mesh to editable B-rep features
- Surface continuity
- Kernel support
Same tables in one file:
docs/cheat-sheet.md.
Agents should call lookup_api(query) over the MCP server.