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 and client setup
- Start a shape The first call in any model: a solid primitive, or a 2D profile to extrude. 46 calls
- Add material Turn a profile into a solid, or grow one along a path. 9 calls
- Remove material Cut into a solid: bolt holes, pockets, slots, plain subtraction. 6 calls
- Combine shapes Merge or intersect solids, or group them without paying for a boolean. 6 calls
- Finish edges Break edges, add draft, hollow out a wall, fold sheet metal. 7 calls
- Select geometry Pick the edges or faces a feature acts on. Query first, then sort or group what comes back. 13 calls
- Place & transform Move a body into position, mirror it, or repeat it. 17 calls
- Assemble Build a mechanism from parts: connectors, mates, joints, posed Scenes. 5 calls
- Curves & surfaces NURBS curves and surfaces, plus the evaluators for measuring them before they become solids. 30 calls
- Measure & verify Ask the kernel what you actually built, and check it before shipping. 9 calls
- Parametrize Declare editable dimensions and do arithmetic on them (JS operators throw on a ParamRef). 12 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
Same tables in one file:
docs/cheat-sheet.md.
Agents should call lookup_api(query) over the MCP server.