w1ne avatar

kernelCAD

w1ne/kernelcad-web

This connects Claude to a browser-based programmatic CAD environment backed by OpenCASCADE. You get deterministic, code-first 3D modeling where geometry is defined in JavaScript using the Replicad API and stored as editable .kcad.ts source files. The MCP endpoint at mcp.kernelcad.com lets Claude write sketches with operations like extrude, revolve, fillet, chamfer, and boolean combinations, then export to STEP or STL. Reach for this when you need reproducible CAD workflows that can be version controlled, reviewed like code, and integrated into agent pipelines rather than clicking through traditional CAD GUIs.

tools
77
transport
HTTP
last updated
Oct 27, 2026

Install

From registry metadata
$ npx add-mcp https://mcp.kernelcad.com/mcp --name kernelcad

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http kernelcad https://mcp.kernelcad.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 77 tools

Verified live against the running server on Nov 6, 2026.

review_paint_peek_latestReturn the newest brush-painted review packet from a Studio session. After sharing a /p/<slug> link, the user can open it in the browser and paint marks over the 3D viewport to give visual feedback. Call this tool with the `slug` from that link to see the strokes — screenshot...3 params

Return the newest brush-painted review packet from a Studio session. After sharing a /p/<slug> link, the user can open it in the browser and paint marks over the 3D viewport to give visual feedback. Call this tool with the `slug` from that link to see the strokes — screenshot...

Parameters* required
freshness_secinteger
Maximum packet age in seconds. Default 1800 (30 min). Use a smaller value for "what did I just paint" or a larger one for "earlier today".
paths_onlyboolean
Controls PNG delivery. Default (omitted or true): return only signed URLs + struck part names — the small, context-friendly response; fetch the bytes via the signed URLs. Set false to also base64-i...
slugstring
Project slug from open_in_studio/get_project/a /p/<slug> link. When given, returns the latest brush packet painted on that project's page — works without OAuth; the slug is the capability. Omit to...
open_in_studioSave the model as a kernelCAD project AND show it: persists a project revision, returns the interactive Studio viewer (MCP Apps / ChatGPT outputTemplate), and includes a PNG preview in the SAME tool result (image content + previewUrl when available). ONE VIEWER PER PROJECT PER...17 params

Save the model as a kernelCAD project AND show it: persists a project revision, returns the interactive Studio viewer (MCP Apps / ChatGPT outputTemplate), and includes a PNG preview in the SAME tool result (image content + previewUrl when available). ONE VIEWER PER PROJECT PER...

Parameters* required
anon_tokenstring
Anonymous owner token returned as `anonToken` by an earlier open_in_studio result. Pass it on every open_in_studio call, also in a new chat, so all your anonymous projects stay together and move to...
attachmentsarray
Complementary project files referenced by relative path from the .kcad source.
body_bboxobject
Body AABB { min:[x,y,z], max:[x,y,z] } mm — for likeness_profile gate when no session attest.
cabin_bboxobject
Optional cabin AABB for likeness gate.
codestring
The full .kcad source of the model to open in Studio (the script you have been editing). Optional: omit to reuse the source from your most recent evaluate_script call.
continue_designboolean
Pass true to add a revision to the design this chat is already saving, even when this call is a different cookbook or title. Ignored when `project` is set.
include_previewboolean
Default true: render an iso PNG preview into this same tool result (reuses the server render cache when this source was already rendered). Set false to skip rasterization and return save/viewer URL...
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
likeness_profilestring
Hard success gate for organic/car bodies. When set, open_in_studio returns ok:false unless body-likeness is publishReady (inline body_bbox/wheels/still_verdicts, or a prior verify body-likeness pas...one of automotive
new_projectboolean
Pass true only when the user wants a separate, new design. Default: continue this chat's project, or your project with the same title from the last 24 h. Still wins over a matching title or cookbook.
parametersarray
Optional list of the model's editable parameters, so Studio can render parameter controls. Each item is one control derived from the .kcad params.
projectstring
Slug of the project to update (from the last open_in_studio result, a "Saved to your projects" note, list_my_projects, or a /p/<slug> link). Adds a new revision to that project instead of creating...
require_stillsboolean
Forwarded to body-likeness gate (default true).
slugstring
Older name for `project`. Use `project`.
still_verdictsarray
Agent still checklist for likeness gate [{ code, passed, finding, view? }].
titlestring
Optional human-readable title for the model (shown in Studio). Defaults to "Model from Claude".
wheelsarray
Wheel centres + radii for likeness gate [{ center:[x,y,z], radius }].
get_projectUse this when you need to reopen a saved project or browse what the user has saved — it fetches a kernelCAD Studio project, or lists the signed-in user's saved projects. Pass `slug` (from a /p/<slug> link or a prior listing) to fetch that project's full .kcad source and metada...1 params

Use this when you need to reopen a saved project or browse what the user has saved — it fetches a kernelCAD Studio project, or lists the signed-in user's saved projects. Pass `slug` (from a /p/<slug> link or a prior listing) to fetch that project's full .kcad source and metada...

Parameters* required
slugstring
The project slug from a listing or a /p/<slug> Studio link. Omit to list the signed-in user's saved projects.
get_project_revisionFetch the exact immutable .kcad source and parameters captured at a prior `open_in_studio` version. Use this to read-after-write verify a release: pass the returned `slug` and `version`, then hash or inspect the returned source. Public/unlisted projects use the slug as capabil...2 params

Fetch the exact immutable .kcad source and parameters captured at a prior `open_in_studio` version. Use this to read-after-write verify a release: pass the returned `slug` and `version`, then hash or inspect the returned source. Public/unlisted projects use the slug as capabil...

Parameters* required
slug*string
Project slug returned by open_in_studio.
version*integer
Positive immutable revision version returned by open_in_studio.
get_latest_renderRender a project's current model server-side and return it as an inline image so you can SEE what you built. Prefer open_in_studio for the happy path — it already includes an iso PNG preview in the same publish result when previewDelivered is true. Use this tool for a differen...3 params

Render a project's current model server-side and return it as an inline image so you can SEE what you built. Prefer open_in_studio for the happy path — it already includes an iso PNG preview in the same publish result when previewDelivered is true. Use this tool for a differen...

Parameters* required
paths_onlyboolean
Controls PNG delivery. Default false: base64-inline the rendered PNG so clients that cannot fetch a URL over HTTP (e.g. a sandboxed agent) can still see it. Set true to return only metadata (smalle...
slug*string
Project slug from open_in_studio/get_project/a /p/<slug> link. The slug is the capability — public/unlisted projects need no OAuth; private projects require the owner to be signed in.
viewstring
View to render. Default "all" = a labeled contact sheet of every canonical angle (iso/front/back/left/right/top) — best for judging the whole model. Pass a single view name for one large render of...one of all · iso · front · back · left · right
get_model_meshReturn the raw per-feature triangle mesh (positions/indices/normals) of a project's current model, by slug. For the in-chat 3D viewer widget to render geometry; delivered over the MCP Apps bridge. The slug is the capability: public/unlisted need no OAuth; private requires the...1 params

Return the raw per-feature triangle mesh (positions/indices/normals) of a project's current model, by slug. For the in-chat 3D viewer widget to render geometry; delivered over the MCP Apps bridge. The slug is the capability: public/unlisted need no OAuth; private requires the...

Parameters* required
slug*string
Project slug from open_in_studio/get_project.
request_uploadUse this when the user has a photo, PDF drawing, STEP, STL, DXF, SVG or 3MF file on their device and you need it in a kernelCAD tool (trace_from_image, drawing_to_cad, mesh_to_features, inspect of:"step", or lib.fromSTEP / fromSTL / fromDXF / fromSVG / referenceImage in a scri...1 params

Use this when the user has a photo, PDF drawing, STEP, STL, DXF, SVG or 3MF file on their device and you need it in a kernelCAD tool (trace_from_image, drawing_to_cad, mesh_to_features, inspect of:"step", or lib.fromSTEP / fromSTL / fromDXF / fromSVG / referenceImage in a scri...

Parameters* required
purposestring
Optional short note shown on the upload page, e.g. "the photo of the worn bracket".
lookup_authoring_skillReturn the kernelcad-authoring skill — conventions for writing .kcad.ts scripts (API surface, parameters, evaluation contract, common pitfalls) — in sections. Call with NO arguments first: you get the quick-start (units, axes, the return rule, the rules that prevent most failu...3 params

Return the kernelcad-authoring skill — conventions for writing .kcad.ts scripts (API surface, parameters, evaluation contract, common pitfalls) — in sections. Call with NO arguments first: you get the quick-start (units, axes, the return rule, the rules that prevent most failu...

Parameters* required
querystring
Keywords to search section titles and bodies (e.g. "sweep along helix").
sectionstring
Section id from the index (e.g. 'top-level-functions'), or 'all' for the full skill.
topicstring
Alias of section; also accepts a loose title such as 'materials' or 'cli commands'.
mesh_summaryMesh a kernelCAD .kcad.ts source server-side and return a COMPACT geometry summary — overall bounds plus, per feature, its id, kind, triangle count, and bounding box. Use this to INSPECT a model's geometry without a viewer: confirm a part is the size/shape you expect, see how...3 params

Mesh a kernelCAD .kcad.ts source server-side and return a COMPACT geometry summary — overall bounds plus, per feature, its id, kind, triangle count, and bounding box. Use this to INSPECT a model's geometry without a viewer: confirm a part is the size/shape you expect, see how...

Parameters* required
fileNamestring
Optional file-name label used in diagnostics (does not affect geometry).
paramsobject
Optional map of parameter-name → numeric value, applied as overrides before meshing (stateless slider recompute).
source*string
The .kcad.ts script source to mesh.
report_needUse this when the user needed something kernelCAD does not have, so the gap is recorded instead of papered over. kind: asset (search_assets returned coverage none or poor: the catalog does not model it), capability (a tool cannot do what was needed), output (a tool answered, b...4 params

Use this when the user needed something kernelCAD does not have, so the gap is recorded instead of papered over. kind: asset (search_assets returned coverage none or poor: the catalog does not model it), capability (a tool cannot do what was needed), output (a tool answered, b...

Parameters* required
contextstring
Optional: what the user was building.
kindstring
one of asset · capability · output · docsdefault: asset
need*string
What was needed, e.g. "low-poly lunar lander for a moon base scene".
toolstring
The tool that fell short, if any (e.g. search_assets).
search_assetsSearch the public kernelCAD asset catalogue of published models. This is not find_part (screws, bearings, NEMA). Read-only. Anonymous callers are allowed. Do not send an API key. Use source:"library" for the free built-in model library. Search its titles, tags or kit IDs, and...13 params

Search the public kernelCAD asset catalogue of published models. This is not find_part (screws, bearings, NEMA). Read-only. Anonymous callers are allowed. Do not send an API key. Use source:"library" for the free built-in model library. Search its titles, tags or kit IDs, and...

Parameters* required
categorystring
Exact category label, e.g. "mechanism".
cursorstring
next_cursor from the previous page. Must be used with the same sort.
ikstring
Inverse-kinematics filter. "any" is any IK target; "arm" and "legs" match ik_type.one of any · arm · legs
kitstring
Exact kit id.
licensestring
SPDX licence id. Every row also carries license.one of CC-BY-4.0 · CC-BY-SA-4.0 · CC-BY-NC-4.0 · CC-BY-NC-SA-4.0 · CC0-1.0 · MIT
limitinteger
Page size, 1-100. Default 24.
max_trianglesinteger
Keep assets with at most this many triangles.
min_trianglesinteger
Keep assets with at least this many triangles.
qstring
Words matched against title, tags and description.
rigboolean
true = only assets with named moving parts (has_rig).
sortstring
latest (default), triangles, or remixed.one of latest · triangles · remixed
sourcestring
library = downloadable built-in models; community = published projects.one of library · community
tagsarray
Every tag must be present on the asset.
get_assetFetch one public catalogue asset by slug. Read-only. No sign-in and no API key. A built-in kit/id returns the free editable downloads.source (.kcad.ts), studio_url, thumbnail_url and license. Download the source with plain GET. For community slugs, returns the search fields pl...1 params

Fetch one public catalogue asset by slug. Read-only. No sign-in and no API key. A built-in kit/id returns the free editable downloads.source (.kcad.ts), studio_url, thumbnail_url and license. Download the source with plain GET. For community slugs, returns the search fields pl...

Parameters* required
slug*string
Catalogue slug from search_assets.
get_asset_packReturn a short-lived signed URL for a catalogue asset zip (mesh, params, licence). Read-only. No sign-in. The URL is already signed. Fetch it with GET. Do not send an API key or an Authorization header. It expires quickly; read expires_at. Share download_url with the user. Uni...1 params

Return a short-lived signed URL for a catalogue asset zip (mesh, params, licence). Read-only. No sign-in. The URL is already signed. Fetch it with GET. Do not send an API key or an Authorization header. It expires quickly; read expires_at. Share download_url with the user. Uni...

Parameters* required
slug*string
Catalogue slug from search_assets or get_asset.
evaluate_scriptUse this when you need to run a script and check it compiles. Full local builds return viewerUrl: a live Studio link reused and updated on later full builds in the same MCP process. Hosted builds return viewerMode: hosted and viewerHint pointing to open_in_studio; they do not...8 params

Use this when you need to run a script and check it compiles. Full local builds return viewerUrl: a live Studio link reused and updated on later full builds in the same MCP process. Hosted builds return viewerMode: hosted and viewerHint pointing to open_in_studio; they do not...

Parameters* required
baselinearray
The `selections` of an earlier evaluation of this model. A selector that now binds to a different face or edge is reported as selector.binding-changed (warning), one whose entity only moved or resi...
codestring
Inline kernelCAD script source.
dryRunboolean
Fast validation only: skip solid build, DFM gates, and meshing. Does not set or clear the active session.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
kernelstring
Solid-modeling kernel. Default 'occt' (OpenCascade); opt-in 'smlib' uses guarded candidates with explicit OCCT fallback diagnostics.one of occt · smlib
requirementsarray
Call-time external requirements ([{ name, predicate }]) measured in the same `requirements` ledger, tagged source: 'external' and never persisted. The predicate is the serializable form of require(...
skipMechanismCheckboolean
Opt out of the default mechanism-truth gate. By default a full evaluation of an assembly-built scene runs checkMechanismTruth and returns a `mechanism` verdict (real/broken/unverified); a broken me...
diff_scriptsUse this when you need to see exactly what changed between two script versions. Structured geometric delta between two versions of a kernelCAD script — a baseline ({ baseFile } or { baseCode }) and a revision ({ file } or { code }). Returns agent-readable JSON: per-part added/...4 params

Use this when you need to see exactly what changed between two script versions. Structured geometric delta between two versions of a kernelCAD script — a baseline ({ baseFile } or { baseCode }) and a revision ({ file } or { code }). Returns agent-readable JSON: per-part added/...

Parameters* required
baseCodestring
Baseline (before) script — inline source. One of baseFile / baseCode is required.
baseFilestring
Baseline (before) script — path to a .kcad.ts file. Local servers only. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
codestring
Revised (after) script — inline source. One of file / code is required.
filestring
Revised (after) script — path to a .kcad.ts file. Local servers only. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
inspectUse this when you need to read facts about a model. One reader, selected by `of`: - 'assembly' — physical assembly inventory (parts, bboxes, connectors, mates, disconnected solids). - 'robot' — URDF/SDFormat export preview (links, joints, planning groups, end-effectors, issues...17 params

Use this when you need to read facts about a model. One reader, selected by `of`: - 'assembly' — physical assembly inventory (parts, bboxes, connectors, mates, disconnected solids). - 'robot' — URDF/SDFormat export preview (links, joints, planning groups, end-effectors, issues...

Parameters* required
assemblystring
of:'assembly'|'robot'|'bom' — assembly name; defaults to the first captured assembly.
atnumber
of:'section' — single slice position along `axis` (mm).
axisstring
of:'section' — normal axis for `at` / `stack` (default 'z').one of x · y · z
categorystring
of:'part-families' — optional top-level category to filter families by.
codestring
Inline kernelCAD script source.
densitynumber
of:'mass' — material density in kg/m^3 (steel 7850, aluminium 2700, ABS 1050). Defaults to 1000 (water); the response echoes the value used and flags when it was defaulted.
edgesobject | array | string
of:'continuity' — optional EdgeQuery or @kc[...] ref(s) limiting which shared edges are sampled.
face_namestring
of:'face-edges' — canonical face name (required for that subject).one of top · bottom · left · right · front · back
facesobject | array | string
of:'curvature' — optional FaceQuery or @kc[...] ref(s) limiting which faces are sampled.
feature_idstring
of:'shape'|'mass'|'topology'|'edges'|'faces'|'face-edges'|'face-labels' — FeatureId; defaults to the last returned shape.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project. Hosted server: pass an https:// URL, a data: URI, or "asse...
gyration_axisobject
of:'mass' — optional axis in shape-local mm to report the radius of gyration about. Omit for centroidal quantities only; the result is density-independent and returned in mm.
of*string
Which facts to read.one of assembly · robot · step · shape · mass · features
planestring | object
of:'section' — section plane. Either a cardinal name string 'xy'|'xz'|'yz', { plane: 'xy'|'xz'|'yz', offset? }, or { origin: [x,y,z], normal: [nx,ny,nz] }. Omit to use `at`+`axis`.
queryobject
of:'edges'|'faces' — optional EdgeQuery/FaceQuery filter.
spike_factornumber
of:'curvature' — spike sensitivity as a multiple of the face's Gaussian stddev (default 6).
stackobject
of:'section' — dense scan: `count` slices evenly spaced from `from` to `to` along `axis`; response reports minAreaIndex/minAreaPosition.
verifyUse this when you need to check a design against a rule set. One verifier, selected by `check`: - 'assembly' — static assembly review ({ file | code }, or the session evaluate_script left): mate validator, default-pose interference, joint topology, mechanical plausibility. ok:...67 params

Use this when you need to check a design against a rule set. One verifier, selected by `check`: - 'assembly' — static assembly review ({ file | code }, or the session evaluate_script left): mate validator, default-pose interference, joint topology, mechanical plausibility. ok:...

Parameters* required
angleToleranceDegnumber
check:'fastener-installation' — axis tilt tolerance, default 1 degree.
assemblystring
Assembly name; defaults to the first captured assembly.
asserted_planeobject
check:'geometry-quality' — optional required mirror plane in model coordinates; normal is normalized and must be nonzero.
check*string
Which verification to run. Omit only when passing call-time `requirements`; then the requirements ledger is the verification.one of assembly · urdf · dfm · dfm-preflight · swept-collision · reachable
codestring
Inline kernelCAD script source (same checks as `file`).
collision_tolerance_mm3number
check:'swept-collision' — BREP intersection volume tolerance (mm^3).
contactToleranceMmnumber
check:'assembly-path' with stability:true — surface distance at or below which parts count as touching (default 0.05 mm).
directionsarray
check:'assembly-path' — additional nonzero world-space removal vectors; normalized and deduplicated.
disassemblyOrderboolean
check:'assembly-path' — iteratively remove freed parts and return removalOrder or stuckParts.
dxfstring
check:'dfm-preflight' — path to a DXF file.
edgesobject | array | string
check:'edge-radius' — EdgeQuery or @kc[...] edge ref(s); intersected with faces. Query near sorts, it does not filter.
facesobject | array | string
check:'edge-radius' — FaceQuery or @kc[...] face ref(s); includes incident edges and fillets on selected faces.
fastenersarray
check:'fastener-installation' — explicit named stations; empty means no coverage.
featureIdstring
check:'dfm-preflight' — FeatureId to scope to.
feature_idstring
check:'geometry-quality' — body feature to measure; defaults to script return. check:'edge-radius' — lowered feature; default the returned model.
filestring
Path to a .kcad.ts script (assembly/dfm/dfm-preflight/swept-collision/reachable/mounting-holes/load-capacity/static-hold/geometry-quality/edge-radius/requirements). Hosted server: cannot read files...
fixturesarray
check:'assembly-path' with stability:true — declared base/fixture part names, stable from step 1. Default: the lowest part(s) along gravity.
gravityarray
check:'static-hold' — gravity vector, m/s^2, world frame (default [0, 0, -9.81]). check:'assembly-path' with stability:true — gravity direction, world frame, magnitude ignored (default [0, 0, -1]).
heatmapsboolean
check:'load-capacity' mode:'fea' — also render stress heatmap PNGs (default false).
jointstring
check:'swept-collision' — joint to sweep; omit to sweep every declared joint. check:'static-hold' — joint to evaluate; omit to evaluate every joint with a declared actuator.

+47 more parameters. See the server's own documentation for the full schema.

why_did_this_failUse this when you need to trace why a feature failed. Walk the upstream chain of a failing feature. Returns the diagnostics of the requested feature plus the diagnostics of every upstream feature in topological order (the requested feature is the last entry). Per-code hints ar...3 params

Use this when you need to trace why a feature failed. Walk the upstream chain of a failing feature. Returns the diagnostics of the requested feature plus the diagnostics of every upstream feature in topological order (the requested feature is the last entry). Per-code hints ar...

Parameters* required
codestring
feature_idstring
filestring
Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
set_paramUse this when you need to edit a param() default value in a kernelCAD script. Returns the modified code as text plus diagnostics from re-evaluating the result. Caller persists the new code via standard file-write tools (this tool has no side effects). With preview: true it bui...4 params

Use this when you need to edit a param() default value in a kernelCAD script. Returns the modified code as text plus diagnostics from re-evaluating the result. Caller persists the new code via standard file-write tools (this tool has no side effects). With preview: true it bui...

Parameters* required
code*string
The .kcad.ts source code.
new_value*value
The new default value. A number for a numeric param (e.g. 12.5), a string expression evaluated in the script (e.g. "width/2 + 3") or a choice/colour, or true/false for a boolean param.
param_name*string
The string literal name of the param (first arg to param()).
previewboolean
S6 edit preview: evaluate the edit in a scratch session and return geometry + requirements-ledger + S1 binding diffs. Writes nothing. Default false (the normal source-edit result).
add_featureUse this when you need to insert a new feature line into a script. Insert a new feature line into a kernelCAD script before the last top-level return statement. Returns the modified code as text plus diagnostics from re-evaluating the result. Side-effect-free. Primitives that...2 params

Use this when you need to insert a new feature line into a script. Insert a new feature line into a kernelCAD script before the last top-level return statement. Returns the modified code as text plus diagnostics from re-evaluating the result. Side-effect-free. Primitives that...

Parameters* required
code*string
The .kcad.ts source code.
feature_code*string
Single-statement source line to insert (e.g. `const hole = cylinder(5, 2).translate(10, 10, -1);`).
add_surfaceUse this when you need an organic, freeform, or swept shape — a body shell, panel, fairing, ergonomic curve, lens, or sculpted form — authored as a NURBS Surface into the user's .kcad.ts, OR when you need to finish surfaces into a watertight solid or taper faces for moldabilit...23 params

Use this when you need an organic, freeform, or swept shape — a body shell, panel, fairing, ergonomic curve, lens, or sculpted form — authored as a NURBS Surface into the user's .kcad.ts, OR when you need to finish surfaces into a watertight solid or taper faces for moldabilit...

Parameters* required
angle_degnumber
kind:'draft' — draft angle in degrees [0, 90]. The face is tapered outward by this angle relative to the pull direction.
binding_namestring
JS const name for the new binding (kind:'nurbs' default surface_<N>; kind:'boundary' default _surface_<N>; kind:'trim' default _trimmed_<N>; kind:'sew' default _sewn_<N>; kind:'draft' default _draf...
by_bindingstring
kind:'trim' — JS variable name of the cutter Surface (must be declared in source). Shape/Curve3D cutters are deferred.
code*string
Current .kcad.ts source.
continuityvalue
kind:'boundary' — continuity grade applied to every edge ('C0' | 'C1' | 'C2'), or an array of 4 grades (one per edge, bottom/right/top/left order). Default 'C0'.
controlsarray
kind:'nurbs' — control-point grid for direct construction (controls[u][v] = [x, y, z], mm).
curve_bindingsarray
kind:'boundary' — tuple of 4 existing Curve3D variable names (bottom, right, top, left) declared earlier in the source.
degreeobject
kind:'nurbs' — degrees in U and V; each in [1, nU-1] / [1, nV-1].
facestring
kind:'draft' — face selector for the face(s) to taper. Accepts a canonical name (top/bottom/front/back/left/right), a user label declared via faceLabels, or a FaceQuery descriptor string.
kind*string
Which surface-construction or surface-finishing path to use: 'nurbs' | 'boundary' | 'trim' | 'sew' | 'draft'.one of nurbs · boundary · trim · sew · draft
knotsobject
kind:'nurbs' — optional explicit knot vectors; missing => clamped uniform inferred.
neutral_planestring
kind:'draft' — parting-line face (the plane where drafted faces remain fixed). Defaults to `face` if omitted.
opstring
kind:'trim' — 'trim' discards the smaller half (calls .trimTo()); 'split' retains both halves (calls .split()).one of trim · split
periodicobject
kind:'nurbs' — optional periodic flags per parametric direction.
pull_dirarray
kind:'draft' — demoulding direction as [x, y, z]. Defaults to the face normal at lower time.
require_closedboolean
kind:'sew' — when true the lowerer emits feature.surface-sew.open-shell if the stitched result is not a watertight solid.
samplinginteger
kind:'boundary' — points sampled along each boundary (default 15).
section_sketch_idsarray
kind:'nurbs' — existing sketch FeatureIds (2 or more) to skin a surface through, in order.
shape_bindingstring
kind:'draft' — JS variable name of the Shape to taper (must be declared in source).
surface_bindingstring
kind:'trim' — JS variable name of the Surface to trim/split (must be declared in source).

+3 more parameters. See the server's own documentation for the full schema.

add_curveUse this when you need a freeform/organic 3D curve — a body feature line, brow, spine rail, or G2 blend between panels — authored as a Curve3D into the user's .kcad.ts immediately before the last top-level return. One authoring path, selected by `kind`: - 'nurbs' — insert a `n...10 params

Use this when you need a freeform/organic 3D curve — a body feature line, brow, spine rail, or G2 blend between panels — authored as a Curve3D into the user's .kcad.ts immediately before the last top-level return. One authoring path, selected by `kind`: - 'nurbs' — insert a `n...

Parameters* required
aobject
kind:'hermite' — start endpoint.
bobject
kind:'hermite' — end endpoint.
binding_namestring
JS const name for the new Curve3D binding (default: _curve_<N>).
closedboolean
kind:'nurbs' — optional periodic/closed-curve flag.
code*string
The .kcad.ts source code.
controlPointsarray
kind:'nurbs' — control points as Vec3 triples in mm; at least 2 entries.
degreeinteger
kind:'nurbs' — curve degree; default 3 (cubic).
kind*string
Which curve-construction path to use.one of nurbs · hermite
knotsarray
kind:'nurbs' — optional explicit knot vector; missing => clamped-uniform inferred.
weightsarray
kind:'nurbs' — optional rational weights, one per control point (same length as controlPoints).
add_path_segmentUse this when you need a freeform/organic 2D outline — an eyewear brow, ergonomic grip, sneaker midsole, or body silhouette — by appending a curved segment to an existing PathBuilder chain on the named `chain_anchor` variable. The call is injected at the END of the chain, imme...14 params

Use this when you need a freeform/organic 2D outline — an eyewear brow, ergonomic grip, sneaker midsole, or body silhouette — by appending a curved segment to an existing PathBuilder chain on the named `chain_anchor` variable. The call is injected at the END of the chain, imme...

Parameters* required
aobject
kind:'hermite' — start endpoint; point must match current pen position within 1e-6 mm.
bobject
kind:'hermite' — end endpoint; pen ends at b.point.
binding_namestring
Reserved for future use; the segment injection mutates the chain anchor in place.
chain_anchor*string
JS identifier of an existing PathBuilder binding (e.g. `const brow = path().moveTo(0,0)`).
code*string
The .kcad.ts source code.
controlPointsarray
kind:'nurbs' — control-net vertices as Vec2 pairs in mm; at least degree+1 entries.
degreeinteger
kind:'nurbs' — B-spline degree (default 3).
endTangentarray
kind:'spline' — optional [x, y] direction vector at points[N-1]. Magnitude is normalised internally; direction matters.
kind*string
Which path-segment kind to append.one of spline · nurbs · hermite
knotsarray
kind:'nurbs' — optional explicit knot vector; length must equal controlPoints.length + degree + 1.
pointsarray
kind:'spline' — waypoints as Vec2 pairs in mm; at least 2 entries; first must match current pen position.
startTangentarray
kind:'spline' — optional [x, y] direction vector at points[0]. Magnitude is normalised internally; direction matters.
tensionnumber
kind:'spline' — optional Catmull-Rom-style stiffness; forwarded to the underlying B-spline approximation.
weightsarray
kind:'nurbs' — optional rational weights (one per control point; strictly positive).
trace_from_imageUse this when you need to trace a reference image into normalized waypoints. Trace pixel-space features from a reference photo into normalized [0..1] waypoints the agent can map to mm via a known scale anchor and feed to path().spline / path().nurbsSegment. Three backends are...9 params

Use this when you need to trace a reference image into normalized waypoints. Trace pixel-space features from a reference photo into normalized [0..1] waypoints the agent can map to mm via a known scale anchor and feed to path().spline / path().nurbsSegment. Three backends are...

Parameters* required
backendstring
Force a specific backend; default `auto` routes by corner-color stddev.one of opencv · vision-llm · hybrid · auto
featuresarray
Features to trace. Defaults to a single { label: "silhouette", kind: "silhouette" } when omitted.
hintstring
Optional free-text hint forwarded to vision-LLM backends (e.g. "a pair of eyewear; trace the upper brow only").
imageUrl*string
URL or path to the reference image. Supports file://, http(s)://, data:image/...;base64,..., or a bare filesystem path. Hosted server: pass an https:// URL, a data: URI, or "asset:<id>" from reques...
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
maxWaypointsPerFeatureinteger
Cap on waypoints per feature. Defaults to 12 (suitable for medium-inflection outlines).
priorsarray
Caller-supplied category-norm defaults (e.g. wall thickness) recorded verbatim as `assumed` ledger facts.
scaleAnchorobject
Pixel-to-real-world scale anchor: two measured points on the image. Absent -> the returned ledger's `scale` fact is `missing`.
validatestring
Assumption-ledger strictness. `warn` (default) never blocks. `error` fails the call when any `missing` ledger fact (e.g. scale) is still open.one of warn · error
add_variable_sweepUse this when you need an organic swept solid whose cross-section changes along its length — a tapering body, horn, bottle, handle, ring band, fairing, or duct — authored as a variable-section sweep along a spine. Inserts `variableSweep(spine, sections, opts?)` into the .kcad....8 params

Use this when you need an organic swept solid whose cross-section changes along its length — a tapering body, horn, bottle, handle, ring band, fairing, or duct — authored as a variable-section sweep along a spine. Inserts `variableSweep(spine, sections, opts?)` into the .kcad....

Parameters* required
binding_namestring
JS const name for the new Shape binding (default: _sweep_<N>).
closedboolean
Optional closed-sweep flag.
code*string
The .kcad.ts source code ("" for a new script).
continuitystring
Inter-section continuity; default 'C1'.one of C0 · C1 · C2
sections*array
Varying cross-sections along the spine; at least 2 entries, strictly increasing in `t`, first t=0, last t=1.
spine_bindingstring
Existing variable name for a Curve3D / Sketch / Vec3[] declared earlier in the source. Use this OR spine_points.
spine_closedboolean
With spine_points: close the spline into a loop (ring band, loop handle).
spine_pointsarray
Inline spine: at least 2 [x, y, z] points in mm, interpolated with spline3d. Use this OR spine_binding.
add_textUse this when you need to author text into a kernelCAD script before the last top-level return. One authoring path, selected by `mode`: - 'sketch' — insert a sketch.text(...) call. The emitted sketch is chainable: pair with subsequent .extrude(...) / cut(...) edits to land an...17 params

Use this when you need to author text into a kernelCAD script before the last top-level return. One authoring path, selected by `mode`: - 'sketch' — insert a sketch.text(...) call. The emitted sketch is chainable: pair with subsequent .extrude(...) / cut(...) edits to land an...

Parameters* required
alignstring
mode:'sketch' — horizontal alignment relative to position (default left); mode:'emboss' — relative to the UV anchor (default center).one of left · center · right
anchorUnumber
mode:'emboss' — U anchor in [0, 1] face-local (0=umin, 0.5=centre, 1=umax). Default 0.5.
anchorVnumber
mode:'emboss' — V anchor in [0, 1] face-local. Default 0.5.
bindAsstring
mode:'sketch' — emits `const <bindAs> = sketch.text(...)`; mode:'emboss' — emits `const <bindAs> = <target>.embossText(...);`.
code*string
The .kcad.ts source code.
contentstring
mode:'sketch' — text content (UTF-8, non-empty, non-whitespace).
depthnumber
mode:'emboss' — signed extrusion depth in mm: positive emboss out, negative engrave in. Must be non-zero.
facestring
mode:'emboss' — target face — canonical name ('top'/'bottom'/'left'/'right'/'front'/'back') or label.
fontstring
mode:'sketch' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans.
fontFamilystring
mode:'emboss' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans.
mode*string
Which text-authoring path to use.one of sketch · emboss
positionarray
mode:'sketch' — [x, y] anchor in mm. Default [0, 0].
rotationnumber
mode:'sketch' — CCW rotation in degrees around position (default 0); mode:'emboss' — CCW rotation in the face tangent plane (default 0).
scaleModestring
mode:'emboss' — Drawing.sketchOnFace scaling mode. Default original.one of original · native · bounds
sizenumber
mode:'sketch'|'emboss' — glyph cap height in mm (positive finite).
targetstring
mode:'emboss' — variable name of the Shape to chain onto (inserted verbatim).
textContentstring
mode:'emboss' — text content (UTF-8, non-empty, non-whitespace).
project_curveUse this when you need to wrap a 2D closed curve onto a 3D face. Insert a `<shape>.projectCurve({ source, face, scaleMode? })` chained call into a kernelCAD script. The `source` is the structured `{ kind: "sketchCommands", commands: [...] }` wire format the runtime API accepts...7 params

Use this when you need to wrap a 2D closed curve onto a 3D face. Insert a `<shape>.projectCurve({ source, face, scaleMode? })` chained call into a kernelCAD script. The `source` is the structured `{ kind: "sketchCommands", commands: [...] }` wire format the runtime API accepts...

Parameters* required
asEdgeboolean
Open-wire (edge) projection. NOT IMPLEMENTED — rejected at edit time. Use a closed-curve projection (omit asEdge).
bindAsstring
Optional local variable name; emits `const <bindAs> = <target>.projectCurve(...);`.
code*string
The .kcad.ts source code.
commands*array
Closed 2D path to wrap onto the face, as plain-number commands. Must start with a `moveTo` and end with a `close` (e.g. [{kind:"moveTo",x:0,y:0},{kind:"lineTo",x:2,y:0},{kind:"lineTo",x:2,y:2},{kin...
face*string
Target face — canonical name or label.
scaleModestring
Drawing.sketchOnFace scaling mode. Default original.one of original · native · bounds
target*string
Variable name of the Shape to chain onto.
add_pattern_featureUse this when you need to repeat a feature in a pattern. Insert a Shape.patternLinear / .patternCircular / .patternGrid call into a kernelCAD script before the last top-level return. Pass structured args (kind + the matching spec object). Returns the modified code plus diagnos...7 params

Use this when you need to repeat a feature in a pattern. Insert a Shape.patternLinear / .patternCircular / .patternGrid call into a kernelCAD script before the last top-level return. Pass structured args (kind + the matching spec object). Returns the modified code plus diagnos...

Parameters* required
assign_tostring
Optional const-binding name; emits `const <assign_to> = <target>.patternX(...);`. Omit for statement form.
circularobject
Required when kind=circular.
code*string
The .kcad.ts source code.
gridobject
Required when kind=grid.
kind*string
one of linear · circular · grid
linearobject
Required when kind=linear.
target*string
Variable name of the Shape to pattern (inserted verbatim as the LHS receiver).
remove_featureUse this when you need to remove a feature line from a script. Remove a single line from a kernelCAD script identified by a substring match. Returns the modified code plus diagnostics from re-evaluating. Refuses to remove the line containing the return statement. Side-effect-f...2 params

Use this when you need to remove a feature line from a script. Remove a single line from a kernelCAD script identified by a substring match. Returns the modified code plus diagnostics from re-evaluating. Refuses to remove the line containing the return statement. Side-effect-f...

Parameters* required
code*string
The .kcad.ts source code.
match*string
A substring that uniquely identifies the line to remove (e.g. `const hole = cylinder(5,`).
queryUse this when you need to resolve or inspect topology against a script's lowered geometry. Pass the script as `code` (inline; works on a hosted server) or `file`. Selected by `mode` (default 'evaluate'): - 'evaluate' — list the faces a Query matches ({ query }). Pass expect:'u...7 params

Use this when you need to resolve or inspect topology against a script's lowered geometry. Pass the script as `code` (inline; works on a hosted server) or `file`. Selected by `mode` (default 'evaluate'): - 'evaluate' — list the faces a Query matches ({ query }). Pass expect:'u...

Parameters* required
codestring
Inline kernelCAD script source.
expectstring
mode:'evaluate' — 'unique' asserts exactly-one.one of any · unique
feature_idstring
Optional FeatureId; defaults to the last lowered shape (use "auto" for lineage).
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
modestring
Resolution mode (default 'evaluate').one of evaluate · resolve · lineage
querystring | object
mode:'evaluate' — Query: a bare face label ('top'), an @kc[<feature-id>/face/<label>] ref, an @kcq[face(...)] expression, or { ast }.
refstring
mode:'resolve'|'lineage' — one face: '@kc[box_1/face/top]', '@kcq[...]', or '<feature-id>.<label>' (lineage).
lookup_apiUse this when you need to list the kernelCAD script-runtime surface: global functions (box, path, selectEdges, helix, etc), Shape methods (fillet, sweep, lower, etc), Sketch methods (extrude, revolve, sweep), PathBuilder methods, EdgeQuery/FaceQuery key sets, and featureKindFa...1 params

Use this when you need to list the kernelCAD script-runtime surface: global functions (box, path, selectEdges, helix, etc), Shape methods (fillet, sweep, lower, etc), Sketch methods (extrude, revolve, sweep), PathBuilder methods, EdgeQuery/FaceQuery key sets, and featureKindFa...

Parameters* required
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
lookup_diagnosticsUse this when you need the kernelCAD 26-code diagnostic catalogue with hint templates. Tiny one-shot call; useful for an agent that wants to pre-populate retry strategies. Hints are also inline on every emitted diagnostic — this tool just gives you the canonical list up front.

Use this when you need the kernelCAD 26-code diagnostic catalogue with hint templates. Tiny one-shot call; useful for an agent that wants to pre-populate retry strategies. Hints are also inline on every emitted diagnostic — this tool just gives you the canonical list up front.

No parameters. Call it with no arguments.

exportUse this when you need to export geometry to a file. One exporter, selected by `target`: - target:'model' — export the script geometry to one file. Pass { file | code }, a required { output_path }, and { format }. Supported formats: stl (binary STL mesh), step (BREP CAD interc...11 params

Use this when you need to export geometry to a file. One exporter, selected by `target`: - target:'model' — export the script geometry to one file. Pass { file | code }, a required { output_path }, and { format }. Supported formats: stl (binary STL mesh), step (BREP CAD interc...

Parameters* required
codestring
Inline kernelCAD script source.
feature_idstring
target:'model' — optional FeatureId to export; defaults to last.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
formatstring
target:'model' — output file format (required for that target).one of stl · step · dxf · 3mf · glb · obj
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
no_verifyboolean
Skip the default STL/STEP validity and watertightness gates.default: false
optionsobject
target:'model' — optional per-format options bag. Discriminator options.format must equal top-level format. step: { unit?: "mm"|"cm"|"in", verify?: boolean } (verify defaults to true and checks B-r...
output_dirstring
target:'part' — destination directory (all-parts mode); files are <dir>/<part>.stl. Hosted server: only the file name is used; the file is written to a server-owned directory and returned as a down...
output_pathstring
Destination path (a directory for format 'bend-table'). target:'model' — the export file (required). target:'part' — single-part .stl path. Hosted server: only the file name is used; the file is wr...
partstring
target:'part' — part name for single-part export, or 'all'.
target*string
Which exporter to run: 'model' (whole-script geometry to one file) or 'part' (per-part STLs from a solved assembly).one of model · part
lookup_cookbookUse this when you need a canonical pattern snippet for a CAD task. Search the kernelCAD cookbook for canonical pattern snippets. Returns top-k snippets matching the natural-language query, ranked by BM25 over title/tags/keywords/trigger. Use when you need a canonical pattern f...4 params

Use this when you need a canonical pattern snippet for a CAD task. Search the kernelCAD cookbook for canonical pattern snippets. Returns top-k snippets matching the natural-language query, ranked by BM25 over title/tags/keywords/trigger. Use when you need a canonical pattern f...

Parameters* required
idstring
Exact snippet id as the skills cite it (e.g. "clearance-hole-through-plate"); returns that snippet. An unknown id is ranked as a query.
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
knumber
Max snippets to return. Default 3, max 5.default: 3
querystring
Natural-language description of what you want to do (e.g. "round the rim of a hole", "build an L-bracket"). One of query / id is required.
find_partSearch the bundled parts catalog (offline). For a NEMA-17 motor write `await lib.standard.nema17()`; for a 608 bearing write `await lib.standard.bearing608()`. Do not fan out parallel lookups and do not pass partsBaseUrl unless you set source:"remote". Remote lookups fail with...9 params

Search the bundled parts catalog (offline). For a NEMA-17 motor write `await lib.standard.nema17()`; for a 608 bearing write `await lib.standard.bearing608()`. Do not fan out parallel lookups and do not pass partsBaseUrl unless you set source:"remote". Remote lookups fail with...

Parameters* required
categorystring
familystring
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
limitnumber
partsBaseUrlstring
Opt-in remote endpoint; no default value ships with kernelCAD.
querystring
sourcestring
one of local · remote · auto
standardstring
tagstring
fetch_partFetch one bundled catalog part. Prefer `await lib.standard.nema17()` and `await lib.standard.bearing608()` — they are offline and do not download remote STEP. A lookup that cannot finish fails within 45s with errorCode parts.lookup.timeout. Do not retry in parallel.8 params

Fetch one bundled catalog part. Prefer `await lib.standard.nema17()` and `await lib.standard.bearing608()` — they are offline and do not download remote STEP. A lookup that cannot finish fails within 45s with errorCode parts.lookup.timeout. Do not retry in parallel.

Parameters* required
categorystring
familystring
idstring
includeModelboolean
Resolve a hash-verified STEP/GLB model file instead of the plain catalog STEP record.
modelobject
Verified model options; supplying model implies includeModel.
partsBaseUrlstring
Opt-in remote endpoint; no default value ships with kernelCAD.
querystring
standardstring
solve_sketchUse this when you need to solve a 2D sketch constraint set. Solve a 2D sketch constraint set. Side-effect-free: pass { entities, constraints } and receive solved entities plus the original constraints. Entities are POINT, LINE, and CIRCLE records; constraints use the kernelCAD...2 params

Use this when you need to solve a 2D sketch constraint set. Solve a 2D sketch constraint set. Side-effect-free: pass { entities, constraints } and receive solved entities plus the original constraints. Entities are POINT, LINE, and CIRCLE records; constraints use the kernelCAD...

Parameters* required
constraints*array
Constraints to apply to the entities.
entities*array
Sketch entities to solve. Lines reference point ids; circles reference a center point id.
add_constraintUse this when you need to add a sketch constraint to a list. Append one validated sketch constraint to a constraint list. Side-effect-free: pass { constraints, constraint } and receive the updated list.2 params

Use this when you need to add a sketch constraint to a list. Append one validated sketch constraint to a constraint list. Side-effect-free: pass { constraints, constraint } and receive the updated list.

Parameters* required
constraint*object
The constraint to append.
constraintsarray
Existing constraint list to append to (omit for an empty list).
add_partUse this when you need to add a part to an assembly. Durably insert `const <binding> = <assembly>.part(partName, shapeExpression, opts?)` before the final top-level return in a kernelCAD source string. Returns modified source plus diagnostics from re-evaluating it. Side-effect...6 params

Use this when you need to add a part to an assembly. Durably insert `const <binding> = <assembly>.part(partName, shapeExpression, opts?)` before the final top-level return in a kernelCAD source string. Returns modified source plus diagnostics from re-evaluating it. Side-effect...

Parameters* required
assembly_binding*string
JS identifier bound to assembly(...), e.g. "arm".
atarray
Optional [x, y, z] assembly placement.
binding_namestring
Optional JS const name for the returned AssemblyPartRef. Defaults to a part-name-derived identifier.
code*string
The .kcad.ts source code.
part_name*string
Assembly-unique part name.
shape_expression*string
JS expression for the Shape to pass to assembly.part, inserted verbatim.
add_connectorUse this when you need to add a mate connector to a part. Durably insert `<partBinding>.connector(name, { type, origin, axis?, normal? })` before the final top-level return. Use the part binding returned by add_part. Returns modified source plus diagnostics from re-evaluation....7 params

Use this when you need to add a mate connector to a part. Durably insert `<partBinding>.connector(name, { type, origin, axis?, normal? })` before the final top-level return. Use the part binding returned by add_part. Returns modified source plus diagnostics from re-evaluation....

Parameters* required
axisarray
Optional [x, y, z] axis.
code*string
The .kcad.ts source code.
name*string
Connector name unique within the part.
normalarray
Optional [x, y, z] normal.
origin*value
Origin as [x, y, z] shorthand, or a structured ConnectorOrigin.
part_binding*string
JS identifier bound to an AssemblyPartRef, e.g. "basePart".
type*string
one of frame · axis · planar · ball
add_mateUse this when you need to author a mate-graph relationship into the source, selected by `relation` (default 'mate'): - 'mate' — a typed mate between two connectors ({ name, a, b, type, pose?, limitsDeg?, limitsMm? }). - 'coupling' — couple a driven mate to a source mate by rat...22 params

Use this when you need to author a mate-graph relationship into the source, selected by `relation` (default 'mate'): - 'mate' — a typed mate between two connectors ({ name, a, b, type, pose?, limitsDeg?, limitsMm? }). - 'coupling' — couple a driven mate to a source mate by rat...

Parameters* required
astring
relation:'mate' — connector ref "<partName>.<connectorName>".
actuatorstring
relation:'transmission' — optional actuator.
assembly_binding*string
JS identifier bound to assembly(...).
bstring
relation:'mate' — connector ref "<partName>.<connectorName>".
code*string
The .kcad.ts source code.
drivenstring
relation:'coupling' — driven mate name.
drivenMatesarray
relation:'transmission' — driven mate names.
inputstring
relation:'transmission' — optional input.
kindstring
relation:'transmission' — transmission kind.one of direct · link-rod · four-bar · gear-pair · belt · tendon
limitsDegarray
relation:'mate' — optional [minDeg, maxDeg].
limitsMmarray
relation:'mate' — optional [minMm, maxMm].
namestring
relation:'mate'|'transmission' — name unique within the assembly.
notesstring
relation:'transmission' — optional notes.
offsetnumber
relation:'coupling' — optional pose offset.
outputstring
relation:'transmission' — optional output.
patharray
relation:'transmission' — drive path.
poseobject
relation:'mate' — optional mate pose.
rationumber
relation:'coupling' — driven pose = source pose * ratio + offset.
relationstring
Which relationship to author (default 'mate').one of mate · coupling · transmission
sourcestring
relation:'coupling' — source mate name.

+2 more parameters. See the server's own documentation for the full schema.

add_workspace_targetUse this when you need to declare a reachability target for a connector. Durably insert `<assembly>.workspace(connectorRef, { reachable, toleranceMm? })` before the final top-level return. Workspace targets are checked by solvedModel validation/review pose-envelope gates. Retu...5 params

Use this when you need to declare a reachability target for a connector. Durably insert `<assembly>.workspace(connectorRef, { reachable, toleranceMm? })` before the final top-level return. Workspace targets are checked by solvedModel validation/review pose-envelope gates. Retu...

Parameters* required
assembly_binding*string
JS identifier bound to assembly(...).
code*string
The .kcad.ts source code.
connector_ref*string
Connector ref "<partName>.<connectorName>".
reachable*array
World-frame Vec3 targets the connector must be able to reach.
toleranceMmnumber
Optional non-negative tolerance in mm.
set_scene_returnUse this when you need to set how the script returns its assembly. Replace the final top-level return statement with `return <assembly>.model();` or `return <assembly>.solvedModel(poses, options?);`. Use solvedModel for mate-authored mechanisms so FK and validation run. Return...5 params

Use this when you need to set how the script returns its assembly. Replace the final top-level return statement with `return <assembly>.model();` or `return <assembly>.solvedModel(poses, options?);`. Use solvedModel for mate-authored mechanisms so FK and validation run. Return...

Parameters* required
assembly_binding*string
JS identifier bound to assembly(...).
code*string
The .kcad.ts source code.
mode*string
one of model · solvedModel
optionsobject
Optional solvedModel options such as { validate: 'warn', posesGate: 'envelope' }.
posesobject
Optional solvedModel pose overrides keyed by mate name. Defaults to {}.
solve_matesUse this when you need to solve the mate graph and get part poses. Run the v0.6 mate-graph solver on the active assembly. Returns { status, poses, iterations? } where each pose is a serialized Transform ({ translation, rotateAxis, rotateDeg }). Optional poses overrides mate po...2 params

Use this when you need to solve the mate graph and get part poses. Run the v0.6 mate-graph solver on the active assembly. Returns { status, poses, iterations? } where each pose is a serialized Transform ({ translation, rotateAxis, rotateDeg }). Optional poses overrides mate po...

Parameters* required
assemblystring
posesobject
Optional numeric pose overrides keyed by mate name.
review_cadRun a deterministic mechanism-fitness review on supplied kernelCAD code or a file. It performs a full evaluation, replaces the active MCP session model on success, and clears that session if evaluation fails. The script may load referenced assets. The review validates the asse...15 params

Run a deterministic mechanism-fitness review on supplied kernelCAD code or a file. It performs a full evaluation, replaces the active MCP session model on success, and clears that session if evaluation fails. The script may load referenced assets. The review validates the asse...

Parameters* required
assemblystring
Assembly name; defaults to the first captured assembly.
codestring
Inline kernelCAD script source.
combinatorialboolean
Sample all 2^N limit-corner combinations across mates with declared limits. Capped at 8 mates with limits; combine with samplesPerMate for both interior coverage and worst-pose detection. Default f...
designGoalstring
Original user design prompt or goal. Included in suggestedRepairPrompt so topology-redesign repairs restart from the intended physical design instead of local coordinate nudges.
epsilonMm3number
Interference volume threshold in mm^3. Default 0.01.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
includeInterferenceboolean
Whether sampled poses run BREP interference checks. Default true.
includePoseEnvelopeboolean
Whether to sample declared mate limits. Default true.
physicalUseCaseLevelstring
Escalating physical-use-case depth; each level includes the previous. 'reachability': targeted sampling over scalar-limited mates named in actuatorLimits, rejecting contacts that cannot get within...one of reachability · statics · reactions
physicalUseCaseSamplesPerMateinteger
Samples per scalar-limited actuator mate for physical-use-case contact reachability. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Default 3; total targeted combinations a...
preserveInterfacesarray
External mates, connector refs, part names, or behavioral interfaces the repair agent must preserve during redesign.
requirePhysicalUseCaseboolean
When true, articulated assemblies must declare arm.physicalUseCase(...) evidence: loads, contacts, stable parts, and actuator limits.
samplesPerMateinteger
Pose-envelope samples per declared-limit mate. 1 (default) = corners only; >=3 adds uniform interior points between min and max. Total samples per non-locked mate = samplesPerMate.
timeBudgetMsnumber
Wall-clock budget for the review in ms (default 90000). Once spent, the remaining heavy stages (pose envelope, physical use case, mechanism sweep) are skipped and listed in skippedStages — a partia...
trackConnectorsarray
Optional connector refs such as ["gripper-plate.tool-tip"] to limit connector workspace reporting.
design_loopUse this when the goal is complex / production / enclosure / gearbox / robot-arm / multi-body, or when you need evaluate→review/verify→revise until green. PREFERRED over one-shot evaluate_script+open_in_studio for Adam-level parts. Runs a CAD design loop over attempt scripts:...19 params

Use this when the goal is complex / production / enclosure / gearbox / robot-arm / multi-body, or when you need evaluate→review/verify→revise until green. PREFERRED over one-shot evaluate_script+open_in_studio for Adam-level parts. Runs a CAD design loop over attempt scripts:...

Parameters* required
allowReviewWarningsarray
Warning diagnostic codes the original prompt explicitly allows. Other review warnings keep the loop iterating even if review_cad is functionally ok.
assemblystring
attempts*array
Ordered design attempts. Each item is { id?, title?, file? OR code?, visualReview? } — provide file or code (at least one). File attempts can be replayed by Studio build records.
autoReviseboolean
When true (default), failing attempts with repairable feature diagnostics (boolean miss, oversized fillet, …) run bounded repair_script and attach revisionAssist.suggestedPatches / autoApplied.sugg...
combinatorialboolean
Sample all 2^N limit-corner combinations across mates with declared limits. Capped at 8 mates with limits; combine with samplesPerMate for both interior coverage and worst-pose detection. Default f...
consensusboolean
Best-of-N by geometric consensus. When true, attempts are N independent candidates for the SAME goal (not a repair sequence): all are reviewed (stopOnPass ignored), all scripts are executed, candid...
epsilonMm3number
Forwarded to review_cad.
goal*string
Original user design goal. Fed into every review_cad repair prompt.
includeInterferenceboolean
Forwarded to review_cad. Default true.
includePoseEnvelopeboolean
Forwarded to review_cad. Default true.
outputRecordPathstring
Optional JSON path to write a Studio-compatible build record.
preserveInterfacesarray
External mates, connector refs, part names, or behavioral interfaces the agent must preserve between attempts.
recordTitlestring
Optional title for the build record.
requirePhysicalAcceptanceboolean
Require declared physicalUseCase common-pose reachability and pose-bound quasi-static certification before accepting an attempt. Design-loop also enables this automatically when an attempt script c...
requireVisualReviewboolean
Require screenshot-backed visualReview with structured checks before accepting an attempt. Default true; set false only for explicit non-visual batch checks.
requirementsarray
Call-time external requirements ([{ name, predicate }]) every attempt is graded against, in the same ledger as script require(). Predicate shape: { metric, a?, b?, op, limit, tolerance?, density? }...
samplesPerMateinteger
Pose-envelope samples per declared-limit mate. 1 (default) = corners only; >=3 adds uniform interior points between min and max. Total samples per non-locked mate = samplesPerMate.
stopOnPassboolean
Stop after the first attempt that is functional and passes the quality gate. Default true.
trackConnectorsarray
Connector refs to track across sampled poses.
flatten_patternUse this when you need the unfolded flat pattern of a bent sheet-metal part. Return the unfolded 2D flat-pattern of a bent sheet-metal Shape as a Region (outer polyline + holes + bend lines + sketch plane). Any number of parallel bends; crossing bends need corner relief. Pass...3 params

Use this when you need the unfolded flat pattern of a bent sheet-metal part. Return the unfolded 2D flat-pattern of a bent sheet-metal Shape as a Region (outer polyline + holes + bend lines + sketch plane). Any number of parallel bends; crossing bends need corner relief. Pass...

Parameters* required
codestring
featureIdstring
filestring
Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
evaluate_sdfUse this when you need to sample a signed-distance field at a point. Sample the signed distance from an in-script sdf.* field at a 3D point. Returns { distance, inside, aabb, kind }. Distance is in mm; negative = inside the surface, 0 = exactly on the surface, positive = outsi...4 params

Use this when you need to sample a signed-distance field at a point. Sample the signed distance from an in-script sdf.* field at a 3D point. Returns { distance, inside, aabb, kind }. Distance is in mm; negative = inside the surface, 0 = exactly on the surface, positive = outsi...

Parameters* required
codestring
Inline kernelCAD script source.
fieldName*string
sdf.bind binding name holding the SdfField.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
point*array
Sample point [x, y, z] in mm.
capture_animationUse this when you need to render a script's animation timeline to a video, or a 360° turntable of a model for sharing. Capture a kernelCAD script's animationView({...}) timeline to an MP4 (ffmpeg) or a PNG frame sequence, verifying the sampled poses for part interference. FILE...17 params

Use this when you need to render a script's animation timeline to a video, or a 360° turntable of a model for sharing. Capture a kernelCAD script's animationView({...}) timeline to an MP4 (ffmpeg) or a PNG frame sequence, verifying the sampled poses for part interference. FILE...

Parameters* required
backgroundstring
Turntable + publish: 'white' (default), 'light', 'dark', 'black', '#rrggbb', or 'transparent' (frames_dir only — MP4/GIF have no usable alpha).
duration_msnumber
Turntable: one full revolution in ms (default 6000).
elevation_degnumber
Turntable: camera elevation above the horizon in degrees (default 22).
environmentstring
Turntable: HDRI environment override ('studio', 'softbox', 'neutral', 'outdoor', 'warehouse', a URL, or 'none').
file*string
Path to a .kcad.ts script with an animationView({...}) record (any script in turntable mode). Required (no inline { code } mode). Hosted server: cannot read files from your machine — pass `code`, o...
focusarray
Show only matching feature ids / assembly part names in the rendered frames. Mutually exclusive with hide. Render-only; does not affect pose verification.
fpsnumber
Override the animationView record's fps.
frames_dirstring
PNG-sequence mode directory: write frame-0000.png... and skip ffmpeg. Mutually exclusive with output_path.
heightinteger
Turntable frame height in px (default 1080; even for MP4).
hidearray
Hide matching feature ids / assembly part names in the rendered frames. Mutually exclusive with focus. Render-only; does not affect pose verification.
no_verifyboolean
Skip the animation-pose interference verification (default: verify on).default: false
output_pathstring
MP4 output path (.gif → looping GIF); default <scriptDir>/<basename>-animation.mp4 (-turntable.mp4 in turntable mode). Mutually exclusive with frames_dir.
presetstring
Turntable look: 'publish' (default; studio product shot) or 'default' (engineering look).one of default · publish
shadowboolean
Turntable + publish: soft contact shadow under the model (default true).
turntableboolean
Seamless 360° orbit of the model instead of the animationView timeline.default: false
verify_everyinteger
Additionally verify at every n-th frame time of the fps schedule (unioned with the keyframe sample set).
widthinteger
Turntable frame width in px (default 1080; even for MP4).
render_previewUse this when you need to LOOK at a kernelCAD model — render its script to deterministic PNG views for visual self-check (the visual half of the evaluate → render → inspect → fix loop), with NO studio or dev server required. Pass { code } (inline source) or { file } (a .kcad.t...23 params

Use this when you need to LOOK at a kernelCAD model — render its script to deterministic PNG views for visual self-check (the visual half of the evaluate → render → inspect → fix loop), with NO studio or dev server required. Pass { code } (inline source) or { file } (a .kcad.t...

Parameters* required
backgroundstring
preset 'publish' only: 'white' (default), 'light', 'dark', 'black', 'transparent' (PNG alpha), or '#rrggbb'.
base_urlstring
Advanced: force a specific render server (e.g. a running studio dev server) instead of the bundled static player.
codestring
Inline kernelCAD script source. Mutually exclusive with file. Relative imports resolve against a temp dir — use file for scripts with relative lib.fromSTEP(...) imports.
environmentstring
HDRI environment override: preset ('studio', 'softbox', 'neutral', 'outdoor', 'warehouse'), a URL, or 'none' for the default three-light rig.
explodeobject
Pull a multi-part assembly apart for the preview. factor ≥ 0 scales spacing by part size; mode is 'mate-axis' (default, along parent mate/joint axes) or 'radial' (away from the assembly centroid)....
filestring
Path to a .kcad.ts script on disk. Mutually exclusive with code. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
focusarray
Show only matching feature ids / assembly part names. Mutually exclusive with hide.
heightinteger
Per-view tile height in px (default 768; 1200 under preset: 'publish').
hidearray
Hide matching feature ids / assembly part names. Mutually exclusive with focus.
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
no_mechanism_checkboolean
Skip the mechanism-truth probe for fast iteration on large assemblies; the preview reports mechanism: 'unverified'. Ignored under KERNELCAD_RENDER_STRICT=1.default: false
no_watermarkboolean
Suppress the kernelCAD version watermark.default: false
out_dirstring
Directory for the PNGs (created if missing). Default: a fresh temp session dir.
overlaystring
Surface-quality overlay: 'zebra' (reflection stripes), 'curvature' (Gaussian vertex colours), 'continuity' (edges coloured G2 green / G1 yellow / G0 orange / broken red). Built as coloured STL band...one of zebra · curvature · continuity
posestring
Extra arbitrary camera pose '<az>,<el>' in degrees, e.g. '30,20'.
presetstring
Render look: 'default' (engineering review) or 'publish' (studio product shot for sharing; one 'hero' image unless views/pose are given).one of default · publish
screenshot_timeout_msinteger
Playwright screenshot deadline in milliseconds. Default leaves Playwright's 30 s in place; raise it for heavy lofts or a slow machine.
sectionobject
Cut the model with one axis-aligned section plane to inspect INTERIOR structure (wall thickness, internal pockets, whether a bore runs through) instead of only the outer shell. position is in mm al...
shadingstring
Mesh shading: 'smooth' uses the kernel's vertex normals (default); 'flat' uses face normals to expose tessellation / surface wobble.one of smooth · flat
shadowboolean
preset 'publish' only: soft contact shadow under the model (default true).

+3 more parameters. See the server's own documentation for the full schema.

resolve_assumptionsUse this when you need to confirm or override the open facts in an assumption ledger from trace_from_image (missing scale, inferred/assumed values) before committing geometry built from a reference photo. Reads the persisted `<model>.ledger.json` at `ledgerPath`, applies each...2 params

Use this when you need to confirm or override the open facts in an assumption ledger from trace_from_image (missing scale, inferred/assumed values) before committing geometry built from a reference photo. Reads the persisted `<model>.ledger.json` at `ledgerPath`, applies each...

Parameters* required
ledgerPath*string
Path to the `<model>.ledger.json` file persisted alongside the traced source.
resolutions*array
One resolution per ledger fact id to act on.
run_feaUse this when you need to know whether a part will hold a load. Runs a linear-static structural study and returns evidence — peak von Mises stress (MPa), peak displacement (mm), the minimum safety factor against the material yield (taken away from the clamp-singular edges of t...14 params

Use this when you need to know whether a part will hold a load. Runs a linear-static structural study and returns evidence — peak von Mises stress (MPa), peak displacement (mm), the minimum safety factor against the material yield (taken away from the clamp-singular edges of t...

Parameters* required
codestring
Inline kernelCAD script source (mutually exclusive with file).
filestring
Path to a .kcad.ts script declaring at least one feaStudy. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
fixedstring | object
Inline study: faces held fixed — a FaceQuery like { atX: 0 }, a face label like 'bottom', or an @kc[...] ref.
heatmapsboolean
Render stress heatmap PNGs (default true).
loadsarray
Inline study: loads, each { faces, force: [Fx, Fy, Fz] } — total force in N on those faces.
materialstring | object
Inline study: material grade name (e.g. 'aluminum-6061') or { E, nu, yield } in MPa.
mesh_sizenumber
Target element size in mm, overriding the study for this run.
mesh_timeout_msnumber
Wall-clock budget for meshing (default 120000).
min_safety_factornumber
Inline study: required minimum safety factor; below it the call fails with fea.safety-factor.below-min.
output_dirstring
Directory for the solver deck, results, summary JSON and heatmap PNGs.
refineboolean
One automatic finer pass (0.75x element size) when the stress is untrusted, inside the element budget (default true). false: one solve at mesh_size.
solve_timeout_msnumber
Wall-clock budget for the solve (default 300000).
solverstring
'auto' (default): CalculiX when installed, else in-process. 'calculix': require it. 'in-process': always the built-in voxel solver.one of auto · calculix · in-process
studystring
Name of the declared study to run; defaults to the last declared one.
fea_summaryUse this when you need a structural check's context without paying for a solve. Read-only: returns the stored summary of a previous run_fea (pass the same `output_dir`), whether the CalculiX + gmsh toolchain is available on this machine (with the install command when it is not...1 params

Use this when you need a structural check's context without paying for a solve. Read-only: returns the stored summary of a previous run_fea (pass the same `output_dir`), whether the CalculiX + gmsh toolchain is available on this machine (with the install command when it is not...

Parameters* required
output_dirstring
Directory a previous run_fea wrote to; omit for toolchain status + material table only.
send_to_printerUse this when you need to upload a .gcode file (e.g. written by export with target: "model", format: "gcode") to a real network printer and, by default, start the print. protocol: 'octoprint' (POST /api/files/local with an X-Api-Key), 'moonraker' (Klipper's POST /server/files/...12 params

Use this when you need to upload a .gcode file (e.g. written by export with target: "model", format: "gcode") to a real network printer and, by default, start the print. protocol: 'octoprint' (POST /api/files/local with an X-Api-Key), 'moonraker' (Klipper's POST /server/files/...

Parameters* required
access_codestring
Bambu LAN-mode access code (printer settings -> LAN Only Mode).
api_keystring
OctoPrint API key (Settings -> API).
dry_runboolean
Validate connectivity/auth only; never uploads or starts a print.
filenamestring
Uploaded file name (default: 'kernelcad.gcode'; bambu-lan appends '.3mf').
gcode_path*string
Path to the .gcode file on disk.
host*string
Printer hostname or IP.
model_3mf_pathstring
bambu-lan only: model .3mf from export format '3mf' to package the G-code into (the uploaded .gcode.3mf).
portnumber
Override the protocol default port.
printerstring
Printer profile id; checked against protocol before upload. List them with 'kernelcad print printers'.one of generic-fdm · bambu-a1-mini · bambu-a1 · bambu-p1s · bambu-p1p · bambu-x1c
protocol*string
one of octoprint · moonraker · bambu-lan
serialstring
Bambu printer serial number (required to start a print unless start_print is false).
start_printboolean
Start the print immediately after upload (default: true).
repair_scriptUse this when evaluate_script reported an error and you want the fix applied rather than described. Takes the candidates why_did_this_fail derives for a diagnostic, applies them one at a time, re-evaluates after each, and keeps the first that clears the diagnostic without intr...6 params

Use this when evaluate_script reported an error and you want the fix applied rather than described. Takes the candidates why_did_this_fail derives for a diagnostic, applies them one at a time, re-evaluates after each, and keeps the first that clears the diagnostic without intr...

Parameters* required
codestring
Inline kernelCAD script source.
diagnosticstring
Diagnostic id from why_did_this_fail's `targetDiagnosticId` / `candidates[].diagnosticId`, or 'first-error' (default) for the first error-severity diagnostic.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
max_attemptsinteger
Upper bound on candidates attempted (default 3). Ignored by apply-first and dry-run.
strategystring
'try-all' (default) walks candidates until one clears the diagnostic; 'apply-first' applies only the top candidate and reports what it did; 'dry-run' previews every candidate patch without evaluating.one of apply-first · try-all · dry-run
sweep_toleranceUse this when you need to know where and why a design breaks across a tolerance/dimension range, not just whether it builds at one nominal value. Declares one or more param() names with a { values: [...] } list or a { min, max, steps } range (number params are bisected; choice...7 params

Use this when you need to know where and why a design breaks across a tolerance/dimension range, not just whether it builds at one nominal value. Declares one or more param() names with a { values: [...] } list or a { min, max, steps } range (number params are bisected; choice...

Parameters* required
assemblystring
Assembly name; defaults to the first captured assembly.
boundaryBudgetnumber
Maximum extra evaluations spent bisecting boundaries. Default 64; 0 skips bisection.
boundaryTolerancenumber
Absolute parameter tolerance for boundary bisection. Default 0.001.
codestring
Inline kernelCAD script source.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
gatesobject
Which standard gates to run per combo.
params*object
param() name -> { values: [number|string, ...] } or { min, max, steps }.
diff_geometryUse this when you need to know WHAT MATERIAL changed between two versions of a model, not just how much. The deeper sibling of diff_scripts: a volume delta alone is ambiguous (a boss that grew and a pocket that deepened report the same magnitude, and a part that only moved rep...7 params

Use this when you need to know WHAT MATERIAL changed between two versions of a model, not just how much. The deeper sibling of diff_scripts: a volume delta alone is ambiguous (a boss that grew and a pocket that deepened report the same magnitude, and a part that only moved rep...

Parameters* required
baseCodestring
Baseline script — inline source.
baseFilestring
Baseline script — path to a .kcad.ts file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
codestring
Revised script — inline source. Mutually exclusive with params.
filestring
Revised script — path to a .kcad.ts file. Mutually exclusive with params. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
out_dirstring
Directory for the overlay PNG, its STL inputs, and the generated overlay script. Default: a temp dir.
paramsobject
Param-override mode: re-lower the BASELINE with these declared param() values changed (e.g. { plateThickness: 8 }). Mutually exclusive with file/code. A name the baseline does not declare fails wit...
renderboolean
Also render an overlay PNG — added material green, removed material red — via the render_preview pipeline. Off by default; the numeric table is the agent-facing evidence.
drawing_to_cadUse this when the reference for a part is a 2D engineering drawing PDF (orthographic views with dimensions), not a photo. Deterministic, no vision model: reads the vector linework (stroke width, dash) and positioned text; classifies visible / hidden / center / dimension / exte...7 params

Use this when the reference for a part is a 2D engineering drawing PDF (orthographic views with dimensions), not a photo. Deterministic, no vision model: reads the vector linework (stroke width, dash) and positioned text; classifies visible / hidden / center / dimension / exte...

Parameters* required
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
outstring
Write the emitted script here (a .kcad.ts path); the ledger is written beside it as <stem>.ledger.json.
pageinteger
1-based page to read. Default 1.
pathstring
Path to the drawing PDF on the machine running kernelCAD. Hosted server: pass an https:// URL, a data: URI, or "asset:<id>" from request_upload — not a path on your machine.
pdfBase64string
The PDF inline, base64-encoded. Use this instead of `path` against a hosted kernelCAD server.
projectionstring
Override the projection angle read from the sheet (default: projection symbol or note, else third-angle).one of third-angle · first-angle
verifyboolean
Evaluate the rebuilt part and compare it with the drawing. Default true.
mesh_to_featuresUse this when you are handed an STL, OBJ or 3MF of a mostly prismatic mechanical part (plate, bracket, spacer, flange, housing block) and need an EDITABLE kernelCAD model of it rather than a faceted lib.fromSTL import. Deterministic, measured, self-verifying: it welds and chec...9 params

Use this when you are handed an STL, OBJ or 3MF of a mostly prismatic mechanical part (plate, bracket, spacer, flange, housing block) and need an EDITABLE kernelCAD model of it rather than a faceted lib.fromSTL import. Deterministic, measured, self-verifying: it welds and chec...

Parameters* required
datastring
Mesh bytes as base64 — use when the server cannot see your filesystem.
filestring
Path to a .stl (binary or ASCII), .obj or .3mf mesh. One of file / data is required. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project. Hoste...
formatstring
Format override; default from the extension or the content.one of stl · obj · 3mf
maxDeviationMmnumber
Max surface deviation (mm) a faithful verdict allows. Default max(0.25, 0.1 % of the bbox diagonal).
maxPassesnumber
Refinement passes, 1–4. Default 4; stops early at the first faithful pass.
maxTrianglesnumber
Refuse meshes above this triangle count instead of stalling. Default 300000.
minIoUnumber
Volume IoU a faithful verdict requires. Default 0.98.
outstring
Write the emitted script to this .kcad.ts path and the assumption ledger to the sibling .ledger.json.
weldToleranceMmnumber
Vertex weld distance in mm. Default max(1e-4, 1e-6 × bbox diagonal).
execute_cookbookUse this when you need evaluate_script (and optionally open_in_studio) for an industry / cookbook demo in ONE step — after lookup_cookbook for industry demos, prefer execute_cookbook when you need evaluate+Studio together; empty lookup is not a stop (freehand-author instead)....9 params

Use this when you need evaluate_script (and optionally open_in_studio) for an industry / cookbook demo in ONE step — after lookup_cookbook for industry demos, prefer execute_cookbook when you need evaluate+Studio together; empty lookup is not a stop (freehand-author instead)....

Parameters* required
continue_designboolean
Pass true to add a revision to the design this chat is already saving, even if this call runs a different cookbook. Ignored when `project` is set.
dryRunboolean
Default false. dryRun:true is NOT evidence the cookbook builds a solid — capture-only checks; do not claim success or open Studio from a dry run alone.default: false
idstring
Cookbook snippet id (e.g. gt2-timing-belt-drive, extrude-rounded-rect-plate).
intentstring
The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.
kernelstring
Solid-modeling kernel forwarded to evaluate_script. Default 'occt'; opt-in 'smlib' uses guarded candidates with explicit OCCT fallback diagnostics.one of occt · smlib
new_projectboolean
Pass true to start a separate project even when this cookbook was already published in this chat.
openInStudioboolean
Default false. When true, after a green full (non-dryRun) evaluate, call open_in_studio on the same script (hosted MCP).default: false
projectstring
Slug of an existing project. Adds a revision to that project. Omit to start a new project when this cookbook or design is different from the one this chat already saved.
querystring
When id is omitted: natural-language query; BM25 picks the top hit (same as lookup_cookbook).
get_selectionUse this when you need to read the human/agent selection in a local Studio session. Returns one clicked face or edge (or null), with current-generation mesh-local shapeIndex/kind/id and creating featureId. During a rebuild selection is null with “selection pending rebuild” unt...2 params

Use this when you need to read the human/agent selection in a local Studio session. Returns one clicked face or edge (or null), with current-generation mesh-local shapeIndex/kind/id and creating featureId. During a rebuild selection is null with “selection pending rebuild” unt...

Parameters* required
session*string
Studio sessionToken from GET /__kernelcad/session?script=<path>. Use the same script as the viewer.
studio_url*string
Local Studio HTTP origin, e.g. http://localhost:5173.
set_selectionUse this when you need to replace the shared local Studio face/edge selection, or clear it with selection:null. The viewer highlights the pick on its next sync (300 ms). Does not edit geometry. Pass model_generation from get_selection; writes from an older generation are rejec...4 params

Use this when you need to replace the shared local Studio face/edge selection, or clear it with selection:null. The viewer highlights the pick on its next sync (300 ms). Does not edit geometry. Pass model_generation from get_selection; writes from an older generation are rejec...

Parameters* required
model_generation*integer
modelGeneration from get_selection; rejects picks from a prior mesh.
selection*value
session*string
Studio sessionToken from GET /__kernelcad/session?script=<path>. Use the same script as the viewer.
studio_url*string
Local Studio HTTP origin, e.g. http://localhost:5173.
import_stepUse this when the user wants to start from their own STEP or STL 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 o...8 params

Use this when the user wants to start from their own STEP or STL 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 o...

Parameters* required
allow_openboolean
STL only: accept a non-watertight mesh as an open shell.default: false
content_base64string
The file bytes, base64-encoded (small files).
file_namestring
Original file name, used for format detection.
formatstring
Override format detection.one of step · stl
namestring
Base name for the written files. Default 'imported'.
output_dirstring
Where to write the file and starter script. Default: a new temp directory.
uploadobject
ChatGPT file reference for a file the user attached.
urlstring
Public https URL that downloads the .step/.stp/.stl file directly.
fab_packUse this when the user wants to get a part made: packages the fabrication files into one directory plus a zip, and returns links to public instant-quote pages. Pass { file | code } and output_dir; optional scope ('part', default — one script's files; 'bom' — the whole assembly...7 params

Use this when the user wants to get a part made: packages the fabrication files into one directory plus a zip, and returns links to public instant-quote pages. Pass { file | code } and output_dir; optional scope ('part', default — one script's files; 'bom' — the whole assembly...

Parameters* required
codestring
Inline kernelCAD script source.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
formatsarray
Files to include. Default step, stl, 3mf, pdf-drawing, bom-csv.
namestring
Base file name (letters, digits, '.', '_', '-'). Default 'part'.
output_dir*string
Directory to write the pack into (created if missing). Hosted server: only the directory name is used; the pack is written in a server-owned directory and returned as download links.
processesarray
Only return quote links for these processes. Default: all.
scopestring
Default 'part' (a single-part pack). 'bom' packs the whole assembly's BOM. 'workshop' packs shop files plus cut list, DXF flats zip, and DFM warnings JSON.one of part · bom · workshop
dfm_reviewUse this when you need a manufacturability (DFM) report before printing or machining a part: returns a pass/fail checklist, no dfmSpec(...) needed. Pass { file | code } and optional processes (default ['fdm', 'cnc']). FDM 3D printing checks: fdm.overhangs (unsupported overhang...11 params

Use this when you need a manufacturability (DFM) report before printing or machining a part: returns a pass/fail checklist, no dfmSpec(...) needed. Pass { file | code } and optional processes (default ['fdm', 'cnc']). FDM 3D printing checks: fdm.overhangs (unsupported overhang...

Parameters* required
approach_axesarray
CNC tool approach directions, one per setup (the tool comes from that side). Default ['+z'].
build_directionstring
FDM part-local axis pointing up from the bed. Default '+z'.one of +x · -x · +y · -y · +z · -z
codestring
Inline kernelCAD script source.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
max_bridge_mmnumber
FDM longest unsupported bridge, mm. Default 10.
max_overhang_degnumber
FDM steepest printable overhang, degrees from vertical (0 = wall, 90 = flat ceiling). Default 45.
max_undercut_area_mm2number
CNC unreachable area tolerated before cnc.undercuts fails, mm². Default 1.
nozzle_mmnumber
FDM nozzle diameter, mm. Default 0.4.
printerstring
FDM printer profile id for the bed-fit check. Default 'generic-fdm'.one of generic-fdm · bambu-a1-mini · bambu-a1 · bambu-p1s · bambu-p1p · bambu-x1c
processesarray
Processes to review. Default ['fdm', 'cnc'].
tool_diameter_mmnumber
CNC end-mill diameter, mm. Default 6.
ray_pickUse this when you need the faces a ray hits in a local Studio model, nearest first, with points, distances, and normals. Inputs are model units (mm); direction is normalized. Requires the local Studio URL and session token for the same script, reads the current model generatio...7 params

Use this when you need the faces a ray hits in a local Studio model, nearest first, with points, distances, and normals. Inputs are model units (mm); direction is normalized. Requires the local Studio URL and session token for the same script, reads the current model generatio...

Parameters* required
codestring
Inline kernelCAD script source.
direction*array
Nonzero ray direction [x, y, z]; normalized internally.
feature_idstring
Displayed terminal feature to ray-pick; defaults to the returned feature. Intermediate features are not available as current viewer selections.
filestring
Path to a .kcad.ts script. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
origin*array
Ray origin [x, y, z] in model units.
session*string
Studio sessionToken for this script, from GET /__kernelcad/session?script=<path>.
studio_url*string
Local Studio HTTP origin, e.g. http://localhost:5173.
inspect_nurbsEvaluate supplied kernelCAD code or a file to capture an authored NURBS curve (nurbsCurve/spline3d). Returns degree, distinct knots and multiplicities, poles, weights, rational and uniformWeights flags, hasNonUnitWeights, and parameter range. Defaults to the last captured curv...3 params

Evaluate supplied kernelCAD code or a file to capture an authored NURBS curve (nurbsCurve/spline3d). Returns degree, distinct knots and multiplicities, poles, weights, rational and uniformWeights flags, hasNonUnitWeights, and parameter range. Defaults to the last captured curv...

Parameters* required
codestring
Inline kernelCAD script source.
feature_idstring
Optional curve3d FeatureId; defaults to the last captured NURBS curve.
filestring
Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
fit_planeUse this when you need to fit an orthogonal least-squares plane to XYZ point-cloud data. Returns centroid, deterministic unit normal, signed point residuals, RMS residual and maximum absolute residual. Accepts points already parsed by the caller from scan data or mesh vertices...1 params

Use this when you need to fit an orthogonal least-squares plane to XYZ point-cloud data. Returns centroid, deterministic unit normal, signed point residuals, RMS residual and maximum absolute residual. Accepts points already parsed by the caller from scan data or mesh vertices...

Parameters* required
points*array
Point cloud as [x, y, z] coordinate triples in model units.
mesh_booleanUse this when the user wants to union, subtract, or intersect two imported triangle mesh solids (STL, OBJ, or 3MF). Supports union, subtract (A minus B) and intersect. Pass each operand as { file } on the MCP server or { data } with base64 mesh bytes; formats are detected or m...5 params

Use this when the user wants to union, subtract, or intersect two imported triangle mesh solids (STL, OBJ, or 3MF). Supports union, subtract (A minus B) and intersect. Pass each operand as { file } on the MCP server or { data } with base64 mesh bytes; formats are detected or m...

Parameters* required
a*object
First mesh: { file } or { data } base64, optional format stl|obj|3mf.
b*object
Second mesh: { file } or { data } base64, optional format stl|obj|3mf.
maxTrianglesinteger
Maximum triangles per input and output. Default and maximum 100000.
operation*string
one of union · subtract · intersect
toleranceMmnumber
Vertex weld tolerance in mm. Default 0.000001.
explode_viewUse this when you need an ordered exploded-view plan for an assembly. Supply parts as {name,center:[x,y,z],size:[x,y,z]} in mm. Optional assembly_order sets the sequence; missing order falls back to input part order, and unlisted/unknown order refs are reported. Choose mode ax...6 params

Use this when you need an ordered exploded-view plan for an assembly. Supply parts as {name,center:[x,y,z],size:[x,y,z]} in mm. Optional assembly_order sets the sequence; missing order falls back to input part order, and unlisted/unknown order refs are reported. Choose mode ax...

Parameters* required
assembly_orderarray
axisarray
Assembly direction; default +Z.
duration_msinteger
Timeline duration from 500 to 60000 ms; default 3000.
modestring
Explode direction strategy; default axis.one of axis · radial
partsarray
Named assembly parts and measured bbox centers/sizes in mm.
spacingnumber
Positive spacing scale; default 1.25.
apply_surface_blendUse this when you need to author and evaluate a fillet or chamfer on a kernelCAD Shape. Inserts Shape.fillet(radius, selector, { continuity: G1|G2 }) or Shape.chamfer(distance, selector) through the existing public API and returns the patched source plus evaluation diagnostics...7 params

Use this when you need to author and evaluate a fillet or chamfer on a kernelCAD Shape. Inserts Shape.fillet(radius, selector, { continuity: G1|G2 }) or Shape.chamfer(distance, selector) through the existing public API and returns the patched source plus evaluation diagnostics...

Parameters* required
code*string
Inline .kcad.ts source.
continuitystring
Fillet continuity passed to the existing public API; defaults to G1. Chamfer ignores this field.one of G1 · G2
distancenumber
Chamfer distance in mm; required for operation:'chamfer'.
operationstring
Operation; defaults to 'fillet'.one of fillet · chamfer
radiusnumber
Fillet radius in mm; required for operation:'fillet'.
selectorvalue
Optional EdgeSelector: a canonical @kc[...] edge ref/query string or { face: canonical face name, face label, or FaceQuery descriptor }. Omit to select all sharp edges.
shape_binding*string
Existing Shape variable name to blend.
write_bomUse this to merge a supplied handoff BOM with optional KernelCAD catalog parts, MPNs and pricing, write a local CSV, and return Sheets-ready rows. Pass exactly one of handoff, handoff_json or handoff_path. The default output is a new file under artifacts/bom; an explicit outpu...6 params

Use this to merge a supplied handoff BOM with optional KernelCAD catalog parts, MPNs and pricing, write a local CSV, and return Sheets-ready rows. Pass exactly one of handoff, handoff_json or handoff_path. The default output is a new file under artifacts/bom; an explicit outpu...

Parameters* required
catalog_partsarray
Optional catalog entries matched by ref or catalog id; unmatched entries become additional rows.
handoffobject
BOM handoff object. Supply exactly one handoff source.
handoff_jsonstring
JSON text containing a handoff object with parts; use instead of handoff or handoff_path.
handoff_pathstring
Path to a handoff JSON file; use instead of handoff or handoff_json.
output_pathstring
Optional CSV destination. Defaults to artifacts/bom/bom-<id>.csv.
overwriteboolean
Set true to replace an existing CSV destination. Existing files are otherwise preserved.
blockout_assemblyUse this when you have a list of parts with bounding boxes and positions (from a layout, spreadsheet, another tool or a sketch) and need an evaluable placeholder assembly script. Pass parts as { name, bboxMm:[x,y,z], positionMm:[x,y,z], rotationDeg?, anchors? } in mm; position...3 params

Use this when you have a list of parts with bounding boxes and positions (from a layout, spreadsheet, another tool or a sketch) and need an evaluable placeholder assembly script. Pass parts as { name, bboxMm:[x,y,z], positionMm:[x,y,z], rotationDeg?, anchors? } in mm; position...

Parameters* required
connectionsarray
namestring
Assembly name, default "blockout".
parts*array
price_partStart or read the real price for making the part. Cheap. Returns status "ready" with estimate_cents and summary, or "pricing" while the makers are asked (call again in a few seconds). Creates nothing and charges nothing.3 params

Start or read the real price for making the part. Cheap. Returns status "ready" with estimate_cents and summary, or "pricing" while the makers are asked (call again in a few seconds). Creates nothing and charges nothing.

Parameters* required
methodobject
How the part should be made. Propose it from the user's words and the part (flat sheet: laser_cut or sheetmetal; metal block: cnc; plastic: fdm_print or resin_print).
slugstring
Saved project slug (from open_in_studio or a /p/<slug> link). Send slug or source, not both.
sourcestring
The kernelCAD script, when the part is not saved. Send slug or source, not both.
order_partOrder the part made: creates the production request and returns a pay_url for the user. Propose the manufacturing method from the user's words and the part, pass it as method with a one-line reason. The price is the real maker price; never invent or send one. Tell the user the...3 params

Order the part made: creates the production request and returns a pay_url for the user. Propose the manufacturing method from the user's words and the part, pass it as method with a one-line reason. The price is the real maker price; never invent or send one. Tell the user the...

Parameters* required
methodobject
How the part should be made. Propose it from the user's words and the part (flat sheet: laser_cut or sheetmetal; metal block: cnc; plastic: fdm_print or resin_print).
slugstring
Saved project slug (from open_in_studio or a /p/<slug> link). Send slug or source, not both.
sourcestring
The kernelCAD script, when the part is not saved. Send slug or source, not both.
estimate_assembly_manufacturingPrepare an indicative estimate and durable manufacturing checklist for a whole CAD assembly, including mixed materials and processes. The server reads material and sheet thickness from CAD, selects supported processes, checks live supplier offers, and reports any missing price...5 params

Prepare an indicative estimate and durable manufacturing checklist for a whole CAD assembly, including mixed materials and processes. The server reads material and sheet thickness from CAD, selects supported processes, checks live supplier offers, and reports any missing price...

Parameters* required
assemblystring
Assembly name when the script contains multiple assemblies.
paramsobject
Current CAD parameter values. Materials and sheet thickness come from the CAD design.
projectSlugstring
Saved project slug. Use this for a saved assembly.
projectVersioninteger
Immutable saved revision to estimate.
sourcestring
Current kernelCAD source for an unsaved assembly.
request_assembly_quoteSubmit a manufacturing quote request after the user has reviewed and explicitly approved the checklist and every displayed warning. KernelCAD staff will confirm the final itemized price. This sends the request for human review and does not charge the customer or start checkout.10 params

Submit a manufacturing quote request after the user has reviewed and explicitly approved the checklist and every displayed warning. KernelCAD staff will confirm the final itemized price. This sends the request for human review and does not charge the customer or start checkout.

Parameters* required
accessTokenstring
Guest access token returned by estimate_assembly_manufacturing; required when submitting as a guest.
assemblystring
Assembly name when the script contains multiple assemblies.
checklist*object
email*string
Contact email for the quote response.
idempotencyKey*string
paramsobject
Current CAD parameter values. Materials and sheet thickness come from the CAD design.
projectSlugstring
Saved project slug. Use this for a saved assembly.
projectVersioninteger
Immutable saved revision to estimate.
requestId*string
sourcestring
Current kernelCAD source for an unsaved assembly.

Sponsors

Readme

kernelCAD — CAD for coding agents, with editable source and checks

Describe a mechanical part in ChatGPT, Claude, Codex, Cursor, or the browser. kernelCAD turns the brief into editable parametric CAD, lets you inspect and revise the geometry, and exports STEP, STL, and drawings.

Start here: Open Studio · Connect your agent · Watch real tool workflows · Read the prompt-to-STEP guide

A parameterized planetary gear stage produced through the kernelCAD agent workflow

Why not just generate an image? Your design remains .kcad.ts source: named features, editable dimensions and assembly structure. Agents can evaluate it, check constraints and clearances, revise the source, and export files for an engineer to inspect. Reproducible example source and documented checks are public. Geometry checks are not material-strength or manufacturing certification.


View the full README on GitHub

Details

Repository
github.com/w1ne/kernelcad-web
Website
kernelcad.com
Categories
Communication & Messaging, Design & Creative
Transport
HTTP
Registry
MCP registry, active
Resources
2
Tools verified
Nov 6, 2026

Related Communication & Messaging MCP servers

View all
1houtini-ai avatarGeminihoutini-ai/gemini-mcpModel Context Protocol server for Google Gemini AI with chat, research, and grounding34stars
2s2thend avatarCursor Historys2thend/cursor-history-mcpMCP server for browsing, searching, exporting, and backing up your Cursor AI chat history33stars
3arikusi avatarDeepseekarikusi/deepseek-mcp-serverMCP server for DeepSeek AI with chat, reasoning, sessions, function calling, and cost tracking26stars
4jmedure avatarTalkbackjmedure/talkback-mcpChat with your Ableton session in real-time.24stars
5alevizio avatarGlobestudioalevizio/globestudioGenerate dotted-globe maps, share URLs, and embed snippets from chat.23stars
6voidmobcom avatarVoidmob Mcpvoidmobcom/voidmob-mcpMobile proxies, non-VoIP SMS verifications, dedicated numbers, and global eSIMs for AI agents.22stars