Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, email [email protected] and we’ll put it right.

com.kernelcad/kernelcad

REMOTE · MCP.KERNELCAD.COM · 2 COMPONENTS · SCANNED AUG 3

Agent-first CAD: editable .kcad.ts source, deterministic review, OpenCASCADE kernel.

+4 this week 65 Trust /100
Trust breakdown (6 categories)

How this component scores in each security and reliability category. Every signal is checked automatically against the live server, and we only credit what we can confirm. How we score →

Endpoint Security57
Transport & Reachability100
Schema Quality & AI Usability69
  • 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
  • AI-judged instruction clarity (good).Pass
  • Context-footprint check failed: tool/resource definitions use about 14270 tokens (~310/item across 46 items; 45 tools + 1 resources), over budget; trim descriptions and params. See how to fix → Fail
  • Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management23
  • Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage98
  • 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
  • 92% of tool parameters carry a description.Partial
  • Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Capabilities100
  • Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.Pass
Install

Add this component to your MCP client. Where a client-specific snippet is available, pick your client below and copy it straight into your config; otherwise use the connection detail shown.

remote · mcp.kernelcad.com

# add to Claude Code
claude mcp add --transport http com-kernelcad-kernelcad https://mcp.kernelcad.com/mcp
# ~/.codex/config.toml
[mcp_servers.com-kernelcad-kernelcad]
url = "https://mcp.kernelcad.com/mcp"
// opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "com-kernelcad-kernelcad": {
      "type": "remote",
      "url": "https://mcp.kernelcad.com/mcp",
      "enabled": true
    }
  }
}
# add to OpenClaw
openclaw mcp add com-kernelcad-kernelcad --url https://mcp.kernelcad.com/mcp --transport streamable-http
# ~/.hermes/config.yaml
mcp_servers:
  com-kernelcad-kernelcad:
    url: "https://mcp.kernelcad.com/mcp"
// mcp.json
{
  "mcpServers": {
    "com-kernelcad-kernelcad": {
      "type": "http",
      "url": "https://mcp.kernelcad.com/mcp"
    }
  }
}

The mcpServers block is a cross-client convention. Remote transports vary, so check your client's docs.

Changelog

Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.

  • 3 Aug 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 20 to 23. That category is still filling its 30-day observation window: 6 days of observed history at the previous scan, 7 at this one. The score rises as the window fills, whether or not the server changes.

  • 1 Aug 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 13 to 17. That category is still filling its 30-day observation window: 4 days of observed history at the previous scan, 5 at this one. The score rises as the window fills, whether or not the server changes.

  • 31 Jul 26 0
    • We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
  • 29 Jul 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 3 to 7. That category is still filling its 30-day observation window: 1 days of observed history at the previous scan, 2 at this one. The score rises as the window fills, whether or not the server changes.

  • 28 Jul 26 +1
    • Stability: unverified → 0.03 functional
  • 27 Jul 26 +61
    • We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
  • 26 Jul 26 0

    First indexed and scored.

Diagnostics

Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.

Captured 3 Aug 2026 · Probed https://mcp.kernelcad.com/mcp

TLS valid

Negotiated TLS 1.3 with TLS_AES_128_GCM_SHA256 .

Subject Issuer Valid from Valid until Key Signature Serial
CN=api.kernelcad.com CN=YE1,O=Let's Encrypt,C=US 26 Jul 2026 24 Oct 2026 ECDSA 256 ECDSA-SHA384 5e5d3aabdb49efa184dbe49fa8809532505
SANs: api.kernelcad.com, mcp.kernelcad.com
CN=YE1,O=Let's Encrypt,C=US (CA) CN=Root YE,O=ISRG,C=US 3 Sept 2025 2 Sept 2028 ECDSA 384 ECDSA-SHA384 5ddd70dd31f801c85c186a7a04b80afe
CN=Root YE,O=ISRG,C=US (CA) CN=ISRG Root X2,O=Internet Security Research Group,C=US 13 May 2026 2 Sept 2032 ECDSA 384 ECDSA-SHA384 872165fc34b6e5fba8add5b3705fb53a
CN=ISRG Root X2,O=Internet Security Research Group,C=US (CA) CN=ISRG Root X1,O=Internet Security Research Group,C=US 13 May 2026 2 Sept 2032 ECDSA 384 SHA256-RSA 6c8f1dc727c7117f7baf853ac980f9cd
DNSSEC insecure

Validation of mcp.kernelcad.com. Not signed

Zone DS Keys Algorithms Outcome
. trust_anchor 20326, 38696 8, 8 Verified
com. present 19718 13 Verified
kernelcad.com. absent Unsigned (proven) parent-signed NSEC/NSEC3 proves an unsigned delegation
Authentication No authorisation required

The endpoint answered without asking for a token. Anyone who knows the URL can reach it.

Result No authorisation required
HTTP status 200
Transports 2 probes
Transport URL Outcome Status Location
streamable-http https://mcp.kernelcad.com/mcp Verified 200
http (plaintext) http://mcp.kernelcad.com/mcp HTTPS enforced 301 https://mcp.kernelcad.com/mcp
MCP tools — 45 exposed · ~14,247 tokens

The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability.

Tool Tokens
add_connector ~183

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. Side-effect-free.

NameTypeReqDescription
axisarrayOptional [x, y, z] axis.
codestringyesThe .kcad.ts source code.
namestringyesConnector name unique within the part.
normalarrayOptional [x, y, z] normal.
originyesOrigin as [x, y, z] shorthand, or a structured ConnectorOrigin.
part_bindingstringyesJS identifier bound to an AssemblyPartRef, e.g. "basePart".
typestringyes
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_constraint ~78

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.

NameTypeReqDescription
constraintobjectyesThe constraint to append.
constraintsarrayExisting constraint list to append to (omit for an empty list).
NameTypeReqDescription
constraintsarrayyesUpdated constraint list.
errorsarrayValidation errors (present on failure).
okbooleanyes

No examples provided.

add_curve ~497

Use this when you need to author a 3D Curve3D into the user's .kcad.ts immediately before the last top-level return. One authoring path, selected by `kind`: - 'nurbs' — insert a `nurbsCurve(controlPoints, opts?)` declaration. Pass `controlPoints` as a Vec3[] (mm, at least 2 points). Optional NURBS knobs: `degree` (default 3), rational `weights`, explicit `knots`, `closed`. - 'hermite' — insert a `hermiteG2(a, b)` declaration: a quintic Hermite curve interpolating two endpoints with matching positions, tangents, and (optional) curvatures — bridges two curves with G2 continuity. Each endpoint is `{ point: Vec3, tangent: Vec3, curvature?: Vec3 }` in mm; tangent magnitude ~ chord length; curvature defaults to [0,0,0] (G1-only). The returned binding has type Curve3D (peer to Shape / Surface) — consume it via `add_variable_sweep` (spine input), `add_surface({ kind: 'boundary' })` (boundary curve), or downstream Curve3D-accepting features. Returns the modified code + diagnostics from re-evaluating. Side-effect-free. Each kind fails closed on its own missing required params.

NameTypeReqDescription
aobjectkind:'hermite' — start endpoint.
bobjectkind:'hermite' — end endpoint.
binding_namestringJS const name for the new Curve3D binding (default: _curve_<N>).
closedbooleankind:'nurbs' — optional periodic/closed-curve flag.
codestringyesThe .kcad.ts source code.
controlPointsarraykind:'nurbs' — control points as Vec3 triples in mm; at least 2 entries.
degreeintegerkind:'nurbs' — curve degree; default 3 (cubic).
kindstringyesWhich curve-construction path to use.
knotsarraykind:'nurbs' — optional explicit knot vector; missing => clamped-uniform inferred.
weightsarraykind:'nurbs' — optional rational weights, one per control point (same length as controlPoints).
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_feature ~175

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 accept faceLabels (box, cylinder, extrudeRect, extrudeCircle, extrudePolygon, extrudeRoundedRect) can receive `opts.faceLabels` in the inserted code — use `lookup_api` to see `featureKindFaceLabels` for the full value schema.

NameTypeReqDescription
codestringyesThe .kcad.ts source code.
feature_codestringyesSingle-statement source line to insert (e.g. `const hole = cylinder(5, 2).translate(10, 10, -1);`).
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_mate ~526

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 ratio ({ driven, source, ratio, offset? }). - 'transmission' — a physical drive path across mates ({ name, kind, sourceMate, drivenMates, path, ... }). All durably edit source and need { code, assembly_binding }. Params other than `relation` are forwarded verbatim; each relation fails closed on its own missing required params.

NameTypeReqDescription
astringrelation:'mate' — connector ref "<partName>.<connectorName>".
actuatorstringrelation:'transmission' — optional actuator.
assembly_bindingstringyesJS identifier bound to assembly(...).
bstringrelation:'mate' — connector ref "<partName>.<connectorName>".
codestringyesThe .kcad.ts source code.
drivenstringrelation:'coupling' — driven mate name.
drivenMatesarrayrelation:'transmission' — driven mate names.
inputstringrelation:'transmission' — optional input.
kindstringrelation:'transmission' — transmission kind.
limitsDegarrayrelation:'mate' — optional [minDeg, maxDeg].
limitsMmarrayrelation:'mate' — optional [minMm, maxMm].
namestringrelation:'mate'|'transmission' — name unique within the assembly.
notesstringrelation:'transmission' — optional notes.
offsetnumberrelation:'coupling' — optional pose offset.
outputstringrelation:'transmission' — optional output.
patharrayrelation:'transmission' — drive path.
poserelation:'mate' — optional mate pose.
rationumberrelation:'coupling' — driven pose = source pose * ratio + offset.
relationstringWhich relationship to author (default 'mate').
sourcestringrelation:'coupling' — source mate name.
sourceMatestringrelation:'transmission' — source mate name.
typestringrelation:'mate' — mate type.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_part ~190

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-free: caller persists the returned source.

NameTypeReqDescription
assembly_bindingstringyesJS identifier bound to assembly(...), e.g. "arm".
atarrayOptional [x, y, z] assembly placement.
binding_namestringOptional JS const name for the returned AssemblyPartRef. Defaults to a part-name-derived identifier.
codestringyesThe .kcad.ts source code.
part_namestringyesAssembly-unique part name.
shape_expressionstringyesJS expression for the Shape to pass to assembly.part, inserted verbatim.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_path_segment ~745

Use this when you need to append a curved segment to an existing PathBuilder chain on the named `chain_anchor` variable. The call is injected at the END of the chain, immediately before any `.close()`. One segment kind, selected by `kind`: - 'spline' — `.spline(points, opts?)`: interpolates through every `points` waypoint (Vec2[] mm, >= 2 entries; points[0] must match current pen position). Optional `tension`, and `startTangent`/`endTangent` 2D direction vectors that constrain the first-derivative direction at the endpoints (magnitude normalised internally). Use for organic 2D outlines (eyewear brow, ergonomic handle, sneaker midsole). - 'nurbs' — `.nurbsSegment(controlPoints, opts?)`: explicit B-spline net (Vec2[] mm, >= degree+1 entries; controlPoints[0] must match pen; pen ends at controlPoints[N-1]). Optional `degree` (default 3), rational `weights` (strictly positive), explicit `knots` (length = controlPoints.length + degree + 1). - 'hermite' — `.hermiteG2(a, b)`: each endpoint `{ point: Vec2, tangent: Vec2, curvature?: Vec2 }` in mm (a.point must match pen; pen ends at b.point). `curvature` defaults to [0,0] (G1); pass matching curvatures for G2 blends. Tangent magnitude is the first derivative (~ chord length), NOT unit length. Returns the modified code + diagnostics from re-evaluating. Side-effect-free. Each kind fails closed on its own missing required params.

NameTypeReqDescription
aobjectkind:'hermite' — start endpoint; point must match current pen position within 1e-6 mm.
bobjectkind:'hermite' — end endpoint; pen ends at b.point.
binding_namestringReserved for future use; the segment injection mutates the chain anchor in place.
chain_anchorstringyesJS identifier of an existing PathBuilder binding (e.g. `const brow = path().moveTo(0,0)`).
codestringyesThe .kcad.ts source code.
controlPointsarraykind:'nurbs' — control-net vertices as Vec2 pairs in mm; at least degree+1 entries.
degreeintegerkind:'nurbs' — B-spline degree (default 3).
endTangentarraykind:'spline' — optional [x, y] direction vector at points[N-1]. Magnitude is normalised internally; direction matters.
kindstringyesWhich path-segment kind to append.
knotsarraykind:'nurbs' — optional explicit knot vector; length must equal controlPoints.length + degree + 1.
pointsarraykind:'spline' — waypoints as Vec2 pairs in mm; at least 2 entries; first must match current pen position.
startTangentarraykind:'spline' — optional [x, y] direction vector at points[0]. Magnitude is normalised internally; direction matters.
tensionnumberkind:'spline' — optional Catmull-Rom-style stiffness; forwarded to the underlying B-spline approximation.
weightsarraykind:'nurbs' — optional rational weights (one per control point; strictly positive).
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_pattern_feature ~277

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 diagnostics from re-evaluating. Side-effect-free. The pattern feature is a single editable unit; pattern-instance face refs resolve via `<sourceId>_pattern_<i>` on the pattern feature's lineage. Geometric note: pattern is implemented as cumulative boolean union of transformed source copies — additive features (boxes, ribs, fins, spokes) pattern cleanly; patterning a subtractive feature (hole, cutout) only preserves the per-instance void when adjacent bodies are disjoint.

NameTypeReqDescription
assign_tostringOptional const-binding name; emits `const <assign_to> = <target>.patternX(...);`. Omit for statement form.
circularobjectRequired when kind=circular.
codestringyesThe .kcad.ts source code.
gridobjectRequired when kind=grid.
kindstringyes
linearobjectRequired when kind=linear.
targetstringyesVariable name of the Shape to pattern (inserted verbatim as the LHS receiver).
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_surface ~597

Use this when you need to author a NURBS Surface into the user's .kcad.ts. One authoring path, selected by `kind`: - 'nurbs' — insert a nurbsSurface(...) / surfaceFromCurves(...) call. Pass either { controls, degree, weights?, knots?, periodic? } for direct construction, OR { section_sketch_ids } for skinning. Slice-1 limitation: weights are accepted but currently ignored (TColStd_Array2OfReal not exposed in WASM bindings); surfaces are non-rational. - 'boundary' — insert a surfaceFromBoundary([c1,c2,c3,c4], opts?) call: one NURBS face through 4 boundary Curve3D refs (bottom, right, top, left in loop order; adjacent endpoints must coincide within 1e-6 mm) via OCCT BRepOffsetAPI_MakeFilling. The returned Surface produces no Shape until you chain .thicken(t) or .toShape() (do that via add_feature on the binding name). Returns the modified code + diagnostics. Each kind fails closed on its own missing required params.

NameTypeReqDescription
binding_namestringJS const name for the new Surface binding (kind:'nurbs' default surface_<N>; kind:'boundary' default _surface_<N>).
codestringyesCurrent .kcad.ts source.
continuitykind:'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'.
controlsarraykind:'nurbs' — control-point grid for direct construction (controls[u][v] = [x, y, z], mm).
curve_bindingsarraykind:'boundary' — tuple of 4 existing Curve3D variable names (bottom, right, top, left) declared earlier in the source.
degreeobjectkind:'nurbs' — degrees in U and V; each in [1, nU-1] / [1, nV-1].
kindstringyesWhich surface-construction path to use.
knotsobjectkind:'nurbs' — optional explicit knot vectors; missing => clamped uniform inferred.
periodicobjectkind:'nurbs' — optional periodic flags per parametric direction.
samplingintegerkind:'boundary' — OCCT NbPtsOnCur sampling parameter (default 15).
section_sketch_idsarraykind:'nurbs' — existing sketch FeatureIds (2 or more) to skin a surface through, in order.
weightsarraykind:'nurbs' — optional rational weights, same grid shape as controls. Ignored in slice-1.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_text ~726

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 engraved or raised text feature. - 'emboss' — insert a `<shape>.embossText({...})` chained call onto an existing Shape `target`. Use for engraved brand text on faces (Ray-Ban temple, CE mark, model number). `depth > 0` raises text out of the face; `depth < 0` engraves text into the face. Lowers via replicad drawText → sketchOnFace → extrude → fuse|cut. Default font is the runtime-bundled Liberation Sans. Side-effect-free; returns the modified code plus diagnostics from re-evaluating. Each mode fails closed on its own missing required params.

NameTypeReqDescription
alignstringmode:'sketch' — horizontal alignment relative to position (default left); mode:'emboss' — relative to the UV anchor (default center).
anchorUnumbermode:'emboss' — U anchor in [0, 1] face-local (0=umin, 0.5=centre, 1=umax). Default 0.5.
anchorVnumbermode:'emboss' — V anchor in [0, 1] face-local. Default 0.5.
bindAsstringmode:'sketch' — emits `const <bindAs> = sketch.text(...)`; mode:'emboss' — emits `const <bindAs> = <target>.embossText(...);`.
codestringyesThe .kcad.ts source code.
contentstringmode:'sketch' — text content (UTF-8, non-empty, non-whitespace).
depthnumbermode:'emboss' — signed extrusion depth in mm: positive emboss out, negative engrave in. Must be non-zero.
facestringmode:'emboss' — target face — canonical name ('top'/'bottom'/'left'/'right'/'front'/'back') or label.
fontstringmode:'sketch' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans.
fontFamilystringmode:'emboss' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans.
modestringyesWhich text-authoring path to use.
positionarraymode:'sketch' — [x, y] anchor in mm. Default [0, 0].
rotationnumbermode:'sketch' — CCW rotation in degrees around position (default 0); mode:'emboss' — CCW rotation in the face tangent plane (default 0).
scaleModestringmode:'emboss' — Drawing.sketchOnFace scaling mode. Default original.
sizenumbermode:'sketch'|'emboss' — glyph cap height in mm (positive finite).
targetstringmode:'emboss' — variable name of the Shape to chain onto (inserted verbatim).
textContentstringmode:'emboss' — text content (UTF-8, non-empty, non-whitespace).
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_variable_sweep ~317

Use this when you need to author a variable-section sweep along a spine. Insert a `variableSweep(spine, sections, opts?)` declaration into the user's .kcad.ts immediately before the last top-level return. The result is a Shape — chain `.translate(...)`, `.union(...)`, etc. via `add_feature`. `spine_binding` references an existing variable (Curve3D / Sketch / Vec3[]) in the source; each `sections[i].profile_binding` references an existing Sketch. Sections must be strictly increasing in `t` and span [0, 1]; first t=0, last t=1. Orientation is not exposed by this MCP tool until runtime orientation support is wired. Validates every binding exists in the source via regex before inserting (fast structured error vs capture-time stack). Returns the modified code + diagnostics. Side-effect-free.

NameTypeReqDescription
binding_namestringJS const name for the new Shape binding (default: _sweep_<N>).
closedbooleanOptional closed-sweep flag.
codestringyesThe .kcad.ts source code.
continuitystringInter-section continuity; default 'C1'.
sectionsarrayyesVarying cross-sections along the spine; at least 2 entries, strictly increasing in `t`, first t=0, last t=1.
spine_bindingstringyesExisting variable name for a Curve3D / Sketch / Vec3[] declared earlier in the source.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

add_workspace_target ~153

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. Returns modified source plus diagnostics from re-evaluation.

NameTypeReqDescription
assembly_bindingstringyesJS identifier bound to assembly(...).
codestringyesThe .kcad.ts source code.
connector_refstringyesConnector ref "<partName>.<connectorName>".
reachablearrayyesWorld-frame Vec3 targets the connector must be able to reach.
toleranceMmnumberOptional non-negative tolerance in mm.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

capture_animation ~596

Use this when you need to render a script's animation timeline to a video. Capture a kernelCAD script's animationView({...}) timeline to an MP4 (ffmpeg) or a PNG frame sequence, verifying the sampled poses for part interference. FILE ONLY: pass { file } (a .kcad.ts path) — there is no { code } mode, because the capture engine renders from a file on disk (its relative lib.fromSTEP imports resolve against the script directory). MP4 by default; pass { frames_dir } to write frame-0000.png... and skip ffmpeg entirely (mutually exclusive with output_path). Animation-pose interference verification runs by default (keyframe times + segment midpoints) BEFORE any browser/ffmpeg cost; { no_verify: true } skips it and { verify_every: n } additionally samples every n-th frame time. Pass { focus } or { hide } (arrays of feature ids or assembly part names, mutually exclusive) to isolate parts in the rendered frames — same semantics as `kernelcad render --focus/--hide`; visibility is render-only and does NOT affect the pose verification. Collisions DO NOT fail the call — the artifact is still written as evidence with ok: true; read verified: false + the collisions[] array. ENVIRONMENT REQUIREMENT (identical to `kernelcad render`): capture drives a headless browser against a running studio dev server reachable at http://localhost:5173 (or the VITE_PORT override); there is no bundled-static serving mode yet, so the same dev-server precondition applies in a production MCP install. Returns { ok, output_path, frame_count, duration_ms, fps, verified, verify_skipped?, collisions: [{ t_ms, a, b, volume_mm3 }], diagnostics }.

NameTypeReqDescription
filestringyesPath to a .kcad.ts script with an animationView({...}) record. Required (no inline { code } mode).
focusarrayShow only matching feature ids / assembly part names in the rendered frames. Mutually exclusive with hide. Render-only; does not affect pose verification.
fpsnumberOverride the animationView record's fps.
frames_dirstringPNG-sequence mode directory: write frame-0000.png... and skip ffmpeg. Mutually exclusive with output_path.
hidearrayHide matching feature ids / assembly part names in the rendered frames. Mutually exclusive with focus. Render-only; does not affect pose verification.
no_verifybooleanSkip the animation-pose interference verification (default: verify on).
output_pathstringMP4 output path; default <scriptDir>/<basename>-animation.mp4. Mutually exclusive with frames_dir.
verify_everyintegerAdditionally verify at every n-th frame time of the fps schedule (unioned with the keyframe sample set).
NameTypeReqDescription
collisionsarrayColliding poses { t_ms, a, b, volume_mm3 }.
diagnosticsarrayyes
duration_msnumber
errorstring
errorCodestring
errorHintstring
failure_kindstring
fpsnumber
frame_countnumber
okbooleanyes
output_pathstringWritten MP4 path (MP4 mode).
verifiedbooleanWhether pose-interference verification passed.
verify_skippedboolean

No examples provided.

design_loop ~488

Use this when you need to run a CAD design loop over multiple attempts. Run an agent CAD design loop over one or more attempt scripts: review each attempt with review_cad, continue past functional attempts that still have unresolved review warnings, return structured repair prompts, and optionally write a Studio-compatible build record JSON for visual replay.

NameTypeReqDescription
allowReviewWarningsarrayWarning diagnostic codes the original prompt explicitly allows. Other review warnings keep the loop iterating even if review_cad is functionally ok.
assemblystring
attemptsarrayyesOrdered 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.
combinatorialbooleanSample 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 fal…
epsilonMm3numberForwarded to review_cad.
goalstringyesOriginal user design goal. Fed into every review_cad repair prompt.
gripperApertureobjectOptional gripper aperture request forwarded to review_cad.
includeInterferencebooleanForwarded to review_cad. Default true.
includePoseEnvelopebooleanForwarded to review_cad. Default true.
outputRecordPathstringOptional JSON path to write a Studio-compatible build record.
preserveInterfacesarrayExternal mates, connector refs, part names, or behavioral interfaces the agent must preserve between attempts.
recordTitlestringOptional title for the build record.
requireVisualReviewbooleanRequire screenshot-backed visualReview with structured checks before accepting an attempt. Default true; set false only for explicit non-visual batch checks.
samplesPerMateintegerPose-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.
stopOnPassbooleanStop after the first attempt that is functional and passes the quality gate. Default true.
trackConnectorsarrayConnector refs to track across sampled poses.
NameTypeReqDescription
attemptsarrayyesPer-attempt review results.
finalAttemptIdstring
goalstringyesEchoed design goal.
nextActionPromptstring
okbooleanyes
outputRecordPathstring
recordobjectStudio-compatible build record (when requested).
recordUrlstring

No examples provided.

diff_scripts ~235

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/removed/renamed/changed (volume mm³ + exact bbox deltas, numbers matching inspect({ of: 'part-stats' })), total interference-volume delta with per-pair detail, mate-graph changes (added/removed/changed mates incl. type, connectors, pose, limits), and param changes (value/min/max). Single-shape scripts diff as one "(root)" pseudo-part. Use after editing a script to verify exactly what changed physically before re-rendering. Read-only — never touches the active session.

NameTypeReqDescription
baseCodestringBaseline script — inline source.
baseFilestringBaseline script — path to a .kcad.ts file.
codestringRevised script — inline source.
filestringRevised script — path to a .kcad.ts file.
NameTypeReqDescription
baseobjectBaseline summary { featureCount, partCount, isAssembly } (success).
diagnosticsarray
errorstringFailure message (failure).
errorCodestring
interferenceobjectTotal interference-volume delta + per-pair detail (success).
matesobjectMate-graph changes (success).
okbooleanyes
paramsobjectParam value/min/max changes (success).
partsobjectPer-part added/removed/renamed/changed/unchanged (success).
revisedobjectRevision summary { featureCount, partCount, isAssembly } (success).
sidestringWhich side failed ('base' | 'revised') (failure).

No examples provided.

evaluate_script ~257

Use this when you need to run a script and check it compiles. Run a kernelCAD .kcad.ts script and report pass/fail + feature count + diagnostics. When the scene is assembly-built (assembly().part(...) → .model()/.solvedModel()), also returns a parts summary { count, names }. Pass either { file: "<path>" } or { code: "<inline source>" }. Set { dryRun: true } for fast validation while iterating: transpile + capture + capture-light checks WITHOUT OCCT lowering, DFM gates, or meshing — milliseconds instead of seconds (100x+ on boolean/fillet-heavy scripts). A dry run catches script throws, capture-time API misuse, and assembly validity-gate failures, but NOT lowering failures or dfmSpec diagnostics; it leaves the active session untouched, so finish with a full (non-dry) evaluate_script before using session-dependent tools.

NameTypeReqDescription
codestringInline kernelCAD script source.
dryRunbooleanFast validation only: skip OCCT lowering, DFM gates, and meshing. Does not set or clear the active session.
filestringPath to a .kcad.ts script file.
NameTypeReqDescription
diagnosticsarrayyes
dryRunbooleanTrue when the result came from a fast dry run.
featureCountnumberyesNumber of features captured by the script.
okbooleanyesWhether the script compiled and lowered cleanly.
partsobjectAssembly parts summary { count, names } when the scene is assembly-built.

No examples provided.

evaluate_sdf ~207

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 = outside. Use this to verify SDF composition before calling sdf.materialize (which is the expensive step). The script must bind the SdfField via sdf.bind('<name>', field) and pass that name as fieldName. Hint: pass either { file } or { code }, plus { fieldName, point: [x,y,z] }.

NameTypeReqDescription
codestringInline kernelCAD script source.
fieldNamestringyessdf.bind binding name holding the SdfField.
filestringPath to a .kcad.ts script file.
pointarrayyesSample point [x, y, z] in mm.
NameTypeReqDescription
aabbobjectAxis-aligned bounding box of the field (success).
distancenumberSigned distance in mm; negative = inside (success).
errorstring
errorCodestring
hintstring
insidebooleanWhether the point is inside the surface (success).
kindstringSDF field kind (success).
okbooleanyes

No examples provided.

export ~815

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 interchange), dxf (planar laser/waterjet profile from a Region or planar face), 3mf (slicer-friendly mesh with per-part colors), glb (web-viewer / AR with PBR materials), svg-drawing (third-angle engineering-drawing sheet: front/top/left + isometric views, hidden edges dashed, tangent edges thin, overall bounding-box dimensions, title block; assemblies are drawn with inter-part occlusion). Robot descriptions: urdf (tree-topology robot description), srdf (motion-planning semantics layered over the URDF), sdf-gazebo (SDFormat 1.10 with native ball joints, closed loops, and solved per-link poses). urdf and sdf-gazebo also write one meshes/<part>.stl per link next to output_path (reported in mesh_files) — ship the whole directory to the consumer. STL exports run a watertight verify by default; failures return ok: false with export.mesh.not-watertight (open-edge count + up to 5 crack-cluster locations) but the file is still written so the broken mesh can be inspected. Optional { feature_id } selects which feature to export (default: last). Optional { options } carries per-format options bag (see the kernelcad-mcp skill for the per-format keys: dxf layers/tolerance/unit, 3mf printUnit/embedSource, glb axis/draco). - target:'part' — export solved-assembly parts as individual binary STL files in their modeled (world-frame) positions. Pass { file | code }, plus { part, output_path } for one part or { output_dir } for all parts (files land at <output_dir>/<part>.stl). A watertight verify runs on every exported mesh by default and fails the call with export.mesh.not-watertight; unknown part names fail with export.part.not-found listing the valid names. Pass { no_verify: true } to skip the watertight gate. All…

NameTypeReqDescription
codestringInline kernelCAD script source.
feature_idstringtarget:'model' — optional FeatureId to export; defaults to last.
filestringPath to a .kcad.ts script file.
formatstringtarget:'model' — output file format (required for that target).
no_verifybooleanSkip the STL watertight verify gate.
optionsobjecttarget:'model' — optional per-format options bag. Discriminator options.format must equal top-level format. dxf: { layers?, unit?: "mm"|"cm"|"in", tolerance? }. 3mf: { printUnit?: "mm"|"cm"|"in", emb…
output_dirstringtarget:'part' — destination directory (all-parts mode); files are <dir>/<part>.stl.
output_pathstringDestination path. target:'model' — the export file (required). target:'part' — single-part .stl path.
partstringtarget:'part' — part name for single-part export, or 'all'.
targetstringyesWhich exporter to run: 'model' (whole-script geometry to one file) or 'part' (per-part STLs from a solved assembly).
NameTypeReqDescription
byte_countnumbertarget:'model' — file size in bytes.
diagnosticsarray
errorstring
feature_countnumber
formatstring
mesh_filesarrayPer-link mesh files for urdf/sdf-gazebo exports.
okbooleanyes
output_pathstringtarget:'model' — written file path.
writtenarraytarget:'part' — per-part export records.

No examples provided.

fetch_part ~137

Use this when you need to download a catalog part as a STEP file. Resolve an id (or single-match query) to a part record and write its STEP file to the local cache. Bundled ids resolve offline; non-bundled ids require partsBaseUrl (or KERNELCAD_PARTS_BASE_URL). Returns the cache path plus a sha256 fingerprint.

NameTypeReqDescription
categorystring
familystring
idstring
partsBaseUrlstringOpt-in remote endpoint; no default value ships with kernelCAD.
querystring
standardstring
NameTypeReqDescription
cachePathstringLocal cache path of the written STEP file (success).
errorstring
errorCodestring
errorHintstring
okbooleanyes
recordobjectResolved part record (success).
sha256stringSHA-256 fingerprint of the STEP file (success).
sourcestringWhere the part came from ('local' | 'remote') (success).

No examples provided.

find_part ~150

Use this when you need to find a part in the catalog. Discover bundled (and optionally remote) part-catalog records by fuzzy query and faceted filters. Tokens AND-combine; cross-facet filters AND-combine. Pass partsBaseUrl (or set KERNELCAD_PARTS_BASE_URL) to enable the remote tier; otherwise results are bundled-only.

NameTypeReqDescription
categorystring
familystring
limitnumber
partsBaseUrlstringOpt-in remote endpoint; no default value ships with kernelCAD.
querystring
sourcestring
standardstring
tagstring
NameTypeReqDescription
errorstring
errorCodestring
errorHintstring
okbooleanyes
remoteEnabledbooleanWhether the remote tier was queried (success).
resultsarrayMatching part records (success).
sourcestringWhere results came from ('local' | 'remote') (success).
totalMatchesnumberTotal matches before limiting (success).

No examples provided.

flatten_pattern ~105

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). Slice 1: at most 2 bends. Pass { file } or { code }; optional { featureId } to pick a specific Shape.

NameTypeReqDescription
codestring
featureIdstring
filestring
NameTypeReqDescription
diagnosticsarrayyes
okbooleanyes
regionobjectUnfolded flat-pattern Region (outer polyline + holes + bend lines + plane).

No examples provided.

get_latest_render ~548

Render a project's current model server-side and return it as an inline image so you can SEE what you built. Use this after open_in_studio (or any /p/<slug> link): call with that `slug` to inspect whether the build looks right. CRITICAL — the image is rendered from the MODEL on the server; it does NOT reflect the user's Studio camera, zoom, or screen. NEVER ask the user to rotate, zoom, pan, move the camera, close a slider, or change their view to help you see — you cannot affect their screen and it cannot affect this render. To see a different angle, call this tool again with a different `view`. By DEFAULT (omit `view`, or `view:"all"`) it returns a CONTACT SHEET of all six canonical views in one labeled image — a 3×2 grid, top row [iso, front, right], bottom row [back, left, top] — so you can judge the model from every side regardless of its orientation (e.g. to find which side has the doors). Pass a single `view` (iso/front/back/left/right/top) for one large render of that angle. DETERMINISTIC: the same model + view always returns the same bytes — identical bytes are NOT a stale/lagging snapshot. If you changed the model, push it with open_in_studio FIRST, then re-render to see the change. The image is always current and never a blank capture. Colors and shading match Studio (same palette / base-material color). The slug is the capability: no OAuth for public/unlisted; private projects require the owner signed in. The PNG is base64-inlined as a real image block by default; pass `paths_only: true` for metadata only. No renderable geometry or a mesh failure → { ok: false, error, hint }, never a blank image.

NameTypeReqDescription
paths_onlybooleanControls 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 (smaller…
slugstringyesProject 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.
viewstringView 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 th…
NameTypeReqDescription
bytesnumberPNG byte length (when ok).
errorstringError code when ok is false (e.g. "empty_geometry", "mesh_failed").
heightnumberRendered image edge in px (when ok).
hintstringNext-action hint when ok is false.
image_b64stringBase64-encoded PNG bytes, present when inlined (paths_only=false) and under the size cap.
okbooleanWhether a render was produced.
truncatedbooleanSet when inline was requested but the PNG exceeded the size cap.
viewstringThe view that was rendered (when ok).
widthnumberRendered image edge in px (when ok).

No examples provided.

get_model_mesh ~89

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 owner signed in.

NameTypeReqDescription
slugstringyesProject slug from open_in_studio/get_project.

Structured output declared, but exposes no named fields.

No examples provided.

get_project ~160

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 metadata — then edit and open_in_studio with the same slug so the user's open tab updates live. Private projects require their owner's OAuth connection. OMIT `slug` to list the signed-in user's saved projects (most recently updated first); that listing mode requires the OAuth connection.

NameTypeReqDescription
slugstringThe project slug from a listing or a /p/<slug> Studio link. Omit to list the signed-in user's saved projects.
NameTypeReqDescription
assetsobjectComplementary files keyed by source-relative path.
codestringFetch mode: the full .kcad source.
okbooleanWhether the read succeeded.
parametersarrayFetch mode: the model's editable parameters.
privacystringFetch mode: the project privacy.
projectsarrayList mode (no slug): the user's saved projects.
slugstringFetch mode: the project slug.
titlestringFetch mode: the project title.
updated_atstringFetch mode: last-updated timestamp.
versionnumberFetch mode: the project version.

No examples provided.

get_project_revision ~109

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 capability; private projects require the owner's OAuth connection.

NameTypeReqDescription
slugstringyesProject slug returned by open_in_studio.
versionintegeryesPositive immutable revision version returned by open_in_studio.
NameTypeReqDescription
assetsobjectImmutable complementary-file manifest.
codestringyesExact .kcad source captured at this revision.
okbooleanyesWhether the revision was found and readable.
parametersarrayyesExact editable parameters captured at this revision.
slugstringyesProject slug.
versionintegeryesImmutable revision version.

No examples provided.

inspect ~560

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). - 'step' — inspect an imported STEP file. - 'shape' — volume / surfaceArea / bbox for one feature ({ feature_id? }). - 'features' — features captured by the script (kind, id, params, transforms, suppression). - 'assemblies' — assembly intent (assemblies, parts, connectors, joints). - 'topology' — canonical face names + edge count for a feature ({ feature_id? }). - 'edges' — edges of a shape with optional EdgeQuery ({ feature_id?, query? }); returns @kc[...] refs. - 'face-edges' — boundary edges of a named canonical face ({ feature_id?, face_name }). - 'faces' — faces of a shape with optional FaceQuery ({ feature_id?, query? }); returns @kc[...] refs. - 'face-labels' — user-applied labels visible in the script. - 'mates' — mates captured by the script. - 'constraints' — sketch constraints captured by the script. - 'part-stats' — bundled parts-catalog statistics. - 'bend-table' — sheet-metal bend table for a flattened pattern. - 'params' — declared model parameters. - 'part-categories' — top-level part-catalog categories available in the bundled (and configured remote) catalog. - 'part-families' — part families within a category ({ category? }); count + exemplar ids per family. All params except `of` are subject-specific and forwarded verbatim. Most subjects accept { file | code }.

NameTypeReqDescription
assemblystringof:'assembly'|'robot' — assembly name; defaults to the first captured assembly.
categorystringof:'part-families' — optional top-level category to filter families by.
codestringInline kernelCAD script source.
face_namestringof:'face-edges' — canonical face name (required for that subject).
feature_idstringof:'shape'|'topology'|'edges'|'faces'|'face-edges'|'face-labels' — FeatureId; defaults to the last returned shape.
filestringPath to a .kcad.ts script file.
ofstringyesWhich facts to read.
queryobjectof:'edges'|'faces' — optional EdgeQuery/FaceQuery filter.
NameTypeReqDescription
errorstringFailure message (present on failure).
errorCodestring
okbooleanWhether the read succeeded.

No examples provided.

lookup_api ~103

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 featureKindFaceLabels (which globals accept opts.faceLabels and valid value shapes). Use this to discover what is callable from a .kcad.ts script.

Input schema present but exposes no named parameters.

NameTypeReqDescription
constraintsobject
curve3dAnalyticsMethodsarray
curve3dMethodsarray
edgeQueryKeysarray
errorstring
faceQueryKeysarray
featureKindFaceLabelsobject
globalsarray
okbooleanyes
paramRefMethodsarray
pathBuilderMethodsarray
sceneMethodsarray
scenePartPropertiesarray
shapeMethodsarray
sketchMethodsarray
surfaceMethodsarray

No examples provided.

lookup_authoring_skill ~105

Return the kernelcad-authoring SKILL.md body — conventions for writing .kcad.ts scripts (imports, parameters, evaluation contract, common pitfalls). Use this tool BEFORE generating CAD code if your MCP client does not list resources. Clients that do list resources should instead read `kernelcad://skills/authoring` directly — the contents are identical. INPUT: none. OUTPUT: { uri, mimeType, text } where `text` is the SKILL.md body.

Input schema present but exposes no named parameters.

NameTypeReqDescription
mimeTypestringMIME type of the returned body.
textstringThe SKILL.md body.
uristringThe authoring-skill resource URI.

No examples provided.

lookup_cookbook ~159

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 for fillet-after-subtract, non-overlapping booleans, sketch-to-extrude flows, etc. Returns empty if no snippet scores above the relevance floor — proceed without cookbook help in that case.

NameTypeReqDescription
knumberMax snippets to return. Default 3, max 5.
querystringyesNatural-language description of what you want to do (e.g. "round the rim of a hole", "build an L-bracket").
NameTypeReqDescription
errorstring
hitsarrayTop-k matching cookbook snippets, ranked by BM25.
okbooleanyes

No examples provided.

lookup_diagnostics ~65

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.

Input schema present but exposes no named parameters.

NameTypeReqDescription
codesarrayyesThe diagnostic-code catalogue with hint templates.
okbooleanyes

No examples provided.

mesh_summary ~351

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 many triangles each feature contributes, or check that every feature produced geometry. This runs the full server-side OCCT pipeline (the same one the Studio renderer uses), so it evaluates modern sources (assembly, path, .material, …) that the legacy client worker cannot. INPUT: `source` (required) the .kcad.ts script text; `fileName` (optional) a label for diagnostics; `params` (optional) a map of parameter-name → number overrides applied before meshing (stateless slider recompute). OUTPUT: { ok, bounds, featureCount, features: [{ id, kind, triangleCount, bbox: { min:[x,y,z], max:[x,y,z] } }], failedFeatureIds, diagnostics }. `ok` is true when every feature meshed; `failedFeatureIds` lists features that failed to compile (and `ok` is then false). Raw vertex/index/normal arrays are NEVER returned — this is a summary only. To SEE the rendered model, use open_in_studio + get_latest_render instead.

NameTypeReqDescription
fileNamestringOptional file-name label used in diagnostics (does not affect geometry).
paramsobjectOptional map of parameter-name → numeric value, applied as overrides before meshing (stateless slider recompute).
sourcestringyesThe .kcad.ts script source to mesh.
NameTypeReqDescription
boundsobjectOverall model bounding box.
diagnosticsarrayKernel diagnostics, if any.
failedFeatureIdsarrayFeature ids that failed to compile (empty when ok).
featureCountnumberNumber of features in the meshed model.
featuresarrayPer-feature summary — never includes raw mesh arrays.
okbooleanTrue when every feature meshed successfully.

No examples provided.

open_in_studio ~402

Use this when the user wants to SEE or share the model — it persists the current kernelCAD model and returns a one-click link that opens it in the kernelCAD Studio web app, where the user can view and share it. Pass the full `.kcad` source you have been building as `code`. `code` is OPTIONAL: if you just called `evaluate_script` you can omit it and this reuses that last evaluated source automatically (no need to re-send the whole script). Pass `code` explicitly to override, or whenever you have not evaluated this exact source yet. The result includes a `slug` — pass that `slug` on every subsequent call to UPDATE the same project in place: the user's open Studio tab re-renders live, so they can watch the model evolve as you iterate. Omit `slug` only for a new, separate model (each omission creates a new project and link). Trigger phrases: "open it in Studio", "let me see it", "show me the model"; also call it after you finish a build, and after each meaningful revision while iterating.

NameTypeReqDescription
attachmentsarrayComplementary project files referenced by relative path from the .kcad source.
codestringThe 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.
parametersarrayOptional list of the model's editable parameters, so Studio can render parameter controls. Each item is one control derived from the .kcad params.
slugstringSlug returned by a previous open_in_studio call. When given, updates that existing project in place (live-updating the user's open Studio tab) instead of creating a new one.
titlestringOptional human-readable title for the model (shown in Studio). Defaults to "Model from Claude".
NameTypeReqDescription
assetHashesarray
attachmentCountinteger
embedUrlstringRead-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login).
okbooleanWhether the model was persisted.
slugstringThe project slug; pass it back to update this project in place.
updatedbooleanTrue when an existing project was updated; false when a new one was created.
urlstringThe /p/<slug> Studio link for the model.
versionintegerImmutable Studio revision persisted by this call. Read it with get_project_revision using this slug and version.

No examples provided.

project_curve ~298

Use this when you need to wrap a 2D curve onto a 3D face. Insert a `<shape>.projectCurve({ curve, face, scaleMode?, asEdge? })` chained call into a kernelCAD script. Wraps a 2D closed curve onto a 3D face along the face normal; pair with `.extrude(d)` / `.cut(...)` for engraved logos or label inserts on curved bodies. `asEdge: true` is captured but currently deferred at lower time (BRepProj_Projection not bundled). Side-effect-free; returns modified code plus diagnostics.

NameTypeReqDescription
asEdgebooleanProject as an open edge instead of a closed face-bound sketch. Currently deferred.
bindAsstringOptional local variable name; emits `const <bindAs> = <target>.projectCurve(...);`.
codestringyesThe .kcad.ts source code.
curveExpressionstringyesJS expression returning a closed sketch (e.g. `path().moveTo(0,0).lineTo(2,0).lineTo(2,2).close().build()`). Inserted verbatim as the `curve:` field.
facestringyesTarget face — canonical name or label.
scaleModestringDrawing.sketchOnFace scaling mode. Default original.
targetstringyesVariable name of the Shape to chain onto.
NameTypeReqDescription
binding_namestringJS const name bound to the new construct (when one was created).
diagnosticsarrayDiagnostics from re-evaluating the modified source.
errorstringFailure message (present when ok is false).
new_codestringModified .kcad.ts source (present on success). Caller persists it.
okbooleanyesWhether the edit applied and re-evaluated cleanly.

No examples provided.

query ~258

Use this when you need to resolve or inspect topology against a script's lowered geometry. Selected by `mode` (default 'evaluate'): - 'evaluate' — inspect a Query (@kc[...] ref, @kcq[...] DSL, or { ast }); returns matched entities. Pass expect:'unique' to assert exactly-one. - 'resolve' — resolve a single @kc[...] / @kcq[...] ref to one entity ({ ref }). - 'lineage' — walk the HistoryMap for a named face ref ({ feature_id, ref }). All params except `mode` are forwarded verbatim.

NameTypeReqDescription
codestringInline kernelCAD script source.
expectstringmode:'evaluate' — 'unique' asserts exactly-one.
feature_idstringOptional FeatureId; defaults to the last lowered shape (use "auto" for lineage).
filestringPath to a .kcad.ts script file.
modestringResolution mode (default 'evaluate').
querymode:'evaluate' — Query input: @kc[...] / @kcq[...] string or { ast } object.
refstringmode:'resolve'|'lineage' — topology ref string.
NameTypeReqDescription
candidatesarraymode:'resolve' — near-miss candidates (failure).
chainarraymode:'lineage' — HistoryMap walk.
entitiesarraymode:'evaluate' — matched entities.
entityobjectmode:'resolve' — the single matched entity.
errorstring
errorCodestring
okbooleanyes
queryobjectmode:'evaluate' — the resolved Query ({ ast }).
refstringmode:'resolve' — the resolved ref string.
warningsarray

No examples provided.