com.kernelcad/kernelcad
REMOTE · MCP.KERNELCAD.COM · 2 COMPONENTS · SCANNED AUG 3
Agent-first CAD: editable .kcad.ts source, deterministic review, OpenCASCADE kernel.
Available components
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
- The endpoint's TLS certificate is valid, in date, and uses a strong key. View diagnostics → Pass
- Authorisation check failed: no authorisation is required to call this server, and it exposes a tool marked destructive (remove_feature). See how to fix → View diagnostics → Fail
- HTTPS is enforced; there's no plaintext access path. View diagnostics → Pass
- HSTS check failed: the Strict-Transport-Security header is absent. See how to fix → View diagnostics → Fail
- DNSSEC check failed: this domain isn't protected by DNSSEC. See how to fix → View diagnostics → Fail
Transport & Reachability100
- Verified streamable-http transport via a live MCP handshake. View diagnostics → Pass
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
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
claude mcp add --transport http com-kernelcad-kernelcad https://mcp.kernelcad.com/mcp
[mcp_servers.com-kernelcad-kernelcad] url = "https://mcp.kernelcad.com/mcp"
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"com-kernelcad-kernelcad": {
"type": "remote",
"url": "https://mcp.kernelcad.com/mcp",
"enabled": true
}
}
} openclaw mcp add com-kernelcad-kernelcad --url https://mcp.kernelcad.com/mcp --transport streamable-http
mcp_servers:
com-kernelcad-kernelcad:
url: "https://mcp.kernelcad.com/mcp" {
"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.
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.
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 |
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.
add_connector 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.
| Name | Type | Req | Description |
|---|---|---|---|
| axis | array | — | Optional [x, y, z] axis. |
| code | string | yes | The .kcad.ts source code. |
| name | string | yes | Connector name unique within the part. |
| normal | array | — | Optional [x, y, z] normal. |
| origin | — | yes | Origin as [x, y, z] shorthand, or a structured ConnectorOrigin. |
| part_binding | string | yes | JS identifier bound to an AssemblyPartRef, e.g. "basePart". |
| type | string | yes | — |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_constraint 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.
| Name | Type | Req | Description |
|---|---|---|---|
| constraint | object | yes | The constraint to append. |
| constraints | array | — | Existing constraint list to append to (omit for an empty list). |
| Name | Type | Req | Description |
|---|---|---|---|
| constraints | array | yes | Updated constraint list. |
| errors | array | — | Validation errors (present on failure). |
| ok | boolean | yes | — |
No examples provided.
add_curve 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.
| Name | Type | Req | Description |
|---|---|---|---|
| a | object | — | kind:'hermite' — start endpoint. |
| b | object | — | kind:'hermite' — end endpoint. |
| binding_name | string | — | JS const name for the new Curve3D binding (default: _curve_<N>). |
| closed | boolean | — | kind:'nurbs' — optional periodic/closed-curve flag. |
| code | string | yes | The .kcad.ts source code. |
| controlPoints | array | — | kind:'nurbs' — control points as Vec3 triples in mm; at least 2 entries. |
| degree | integer | — | kind:'nurbs' — curve degree; default 3 (cubic). |
| kind | string | yes | Which curve-construction path to use. |
| knots | array | — | kind:'nurbs' — optional explicit knot vector; missing => clamped-uniform inferred. |
| weights | array | — | kind:'nurbs' — optional rational weights, one per control point (same length as controlPoints). |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_feature 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.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | The .kcad.ts source code. |
| feature_code | string | yes | Single-statement source line to insert (e.g. `const hole = cylinder(5, 2).translate(10, 10, -1);`). |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_mate 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.
| Name | Type | Req | Description |
|---|---|---|---|
| a | string | — | relation:'mate' — connector ref "<partName>.<connectorName>". |
| actuator | string | — | relation:'transmission' — optional actuator. |
| assembly_binding | string | yes | JS identifier bound to assembly(...). |
| b | string | — | relation:'mate' — connector ref "<partName>.<connectorName>". |
| code | string | yes | The .kcad.ts source code. |
| driven | string | — | relation:'coupling' — driven mate name. |
| drivenMates | array | — | relation:'transmission' — driven mate names. |
| input | string | — | relation:'transmission' — optional input. |
| kind | string | — | relation:'transmission' — transmission kind. |
| limitsDeg | array | — | relation:'mate' — optional [minDeg, maxDeg]. |
| limitsMm | array | — | relation:'mate' — optional [minMm, maxMm]. |
| name | string | — | relation:'mate'|'transmission' — name unique within the assembly. |
| notes | string | — | relation:'transmission' — optional notes. |
| offset | number | — | relation:'coupling' — optional pose offset. |
| output | string | — | relation:'transmission' — optional output. |
| path | array | — | relation:'transmission' — drive path. |
| pose | — | — | relation:'mate' — optional mate pose. |
| ratio | number | — | relation:'coupling' — driven pose = source pose * ratio + offset. |
| relation | string | — | Which relationship to author (default 'mate'). |
| source | string | — | relation:'coupling' — source mate name. |
| sourceMate | string | — | relation:'transmission' — source mate name. |
| type | string | — | relation:'mate' — mate type. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_part 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.
| Name | Type | Req | Description |
|---|---|---|---|
| assembly_binding | string | yes | JS identifier bound to assembly(...), e.g. "arm". |
| at | array | — | Optional [x, y, z] assembly placement. |
| binding_name | string | — | Optional JS const name for the returned AssemblyPartRef. Defaults to a part-name-derived identifier. |
| code | string | yes | The .kcad.ts source code. |
| part_name | string | yes | Assembly-unique part name. |
| shape_expression | string | yes | JS expression for the Shape to pass to assembly.part, inserted verbatim. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_path_segment 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.
| Name | Type | Req | Description |
|---|---|---|---|
| a | object | — | kind:'hermite' — start endpoint; point must match current pen position within 1e-6 mm. |
| b | object | — | kind:'hermite' — end endpoint; pen ends at b.point. |
| binding_name | string | — | Reserved for future use; the segment injection mutates the chain anchor in place. |
| chain_anchor | string | yes | JS identifier of an existing PathBuilder binding (e.g. `const brow = path().moveTo(0,0)`). |
| code | string | yes | The .kcad.ts source code. |
| controlPoints | array | — | kind:'nurbs' — control-net vertices as Vec2 pairs in mm; at least degree+1 entries. |
| degree | integer | — | kind:'nurbs' — B-spline degree (default 3). |
| endTangent | array | — | kind:'spline' — optional [x, y] direction vector at points[N-1]. Magnitude is normalised internally; direction matters. |
| kind | string | yes | Which path-segment kind to append. |
| knots | array | — | kind:'nurbs' — optional explicit knot vector; length must equal controlPoints.length + degree + 1. |
| points | array | — | kind:'spline' — waypoints as Vec2 pairs in mm; at least 2 entries; first must match current pen position. |
| startTangent | array | — | kind:'spline' — optional [x, y] direction vector at points[0]. Magnitude is normalised internally; direction matters. |
| tension | number | — | kind:'spline' — optional Catmull-Rom-style stiffness; forwarded to the underlying B-spline approximation. |
| weights | array | — | kind:'nurbs' — optional rational weights (one per control point; strictly positive). |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_pattern_feature 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.
| Name | Type | Req | Description |
|---|---|---|---|
| assign_to | string | — | Optional const-binding name; emits `const <assign_to> = <target>.patternX(...);`. Omit for statement form. |
| circular | object | — | Required when kind=circular. |
| code | string | yes | The .kcad.ts source code. |
| grid | object | — | Required when kind=grid. |
| kind | string | yes | — |
| linear | object | — | Required when kind=linear. |
| target | string | yes | Variable name of the Shape to pattern (inserted verbatim as the LHS receiver). |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_surface 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.
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name for the new Surface binding (kind:'nurbs' default surface_<N>; kind:'boundary' default _surface_<N>). |
| code | string | yes | Current .kcad.ts source. |
| continuity | — | — | 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'. |
| controls | array | — | kind:'nurbs' — control-point grid for direct construction (controls[u][v] = [x, y, z], mm). |
| curve_bindings | array | — | kind:'boundary' — tuple of 4 existing Curve3D variable names (bottom, right, top, left) declared earlier in the source. |
| degree | object | — | kind:'nurbs' — degrees in U and V; each in [1, nU-1] / [1, nV-1]. |
| kind | string | yes | Which surface-construction path to use. |
| knots | object | — | kind:'nurbs' — optional explicit knot vectors; missing => clamped uniform inferred. |
| periodic | object | — | kind:'nurbs' — optional periodic flags per parametric direction. |
| sampling | integer | — | kind:'boundary' — OCCT NbPtsOnCur sampling parameter (default 15). |
| section_sketch_ids | array | — | kind:'nurbs' — existing sketch FeatureIds (2 or more) to skin a surface through, in order. |
| weights | array | — | kind:'nurbs' — optional rational weights, same grid shape as controls. Ignored in slice-1. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_text 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.
| Name | Type | Req | Description |
|---|---|---|---|
| align | string | — | mode:'sketch' — horizontal alignment relative to position (default left); mode:'emboss' — relative to the UV anchor (default center). |
| anchorU | number | — | mode:'emboss' — U anchor in [0, 1] face-local (0=umin, 0.5=centre, 1=umax). Default 0.5. |
| anchorV | number | — | mode:'emboss' — V anchor in [0, 1] face-local. Default 0.5. |
| bindAs | string | — | mode:'sketch' — emits `const <bindAs> = sketch.text(...)`; mode:'emboss' — emits `const <bindAs> = <target>.embossText(...);`. |
| code | string | yes | The .kcad.ts source code. |
| content | string | — | mode:'sketch' — text content (UTF-8, non-empty, non-whitespace). |
| depth | number | — | mode:'emboss' — signed extrusion depth in mm: positive emboss out, negative engrave in. Must be non-zero. |
| face | string | — | mode:'emboss' — target face — canonical name ('top'/'bottom'/'left'/'right'/'front'/'back') or label. |
| font | string | — | mode:'sketch' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans. |
| fontFamily | string | — | mode:'emboss' — optional logical font name or .ttf file path; defaults to bundled Liberation Sans. |
| mode | string | yes | Which text-authoring path to use. |
| position | array | — | mode:'sketch' — [x, y] anchor in mm. Default [0, 0]. |
| rotation | number | — | mode:'sketch' — CCW rotation in degrees around position (default 0); mode:'emboss' — CCW rotation in the face tangent plane (default 0). |
| scaleMode | string | — | mode:'emboss' — Drawing.sketchOnFace scaling mode. Default original. |
| size | number | — | mode:'sketch'|'emboss' — glyph cap height in mm (positive finite). |
| target | string | — | mode:'emboss' — variable name of the Shape to chain onto (inserted verbatim). |
| textContent | string | — | mode:'emboss' — text content (UTF-8, non-empty, non-whitespace). |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_variable_sweep 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.
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name for the new Shape binding (default: _sweep_<N>). |
| closed | boolean | — | Optional closed-sweep flag. |
| code | string | yes | The .kcad.ts source code. |
| continuity | string | — | Inter-section continuity; default 'C1'. |
| sections | array | yes | Varying cross-sections along the spine; at least 2 entries, strictly increasing in `t`, first t=0, last t=1. |
| spine_binding | string | yes | Existing variable name for a Curve3D / Sketch / Vec3[] declared earlier in the source. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
add_workspace_target 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.
| Name | Type | Req | Description |
|---|---|---|---|
| assembly_binding | string | yes | JS identifier bound to assembly(...). |
| code | string | yes | The .kcad.ts source code. |
| connector_ref | string | yes | Connector ref "<partName>.<connectorName>". |
| reachable | array | yes | World-frame Vec3 targets the connector must be able to reach. |
| toleranceMm | number | — | Optional non-negative tolerance in mm. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
capture_animation 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 }.
| Name | Type | Req | Description |
|---|---|---|---|
| file | string | yes | Path to a .kcad.ts script with an animationView({...}) record. Required (no inline { code } mode). |
| focus | array | — | Show only matching feature ids / assembly part names in the rendered frames. Mutually exclusive with hide. Render-only; does not affect pose verification. |
| fps | number | — | Override the animationView record's fps. |
| frames_dir | string | — | PNG-sequence mode directory: write frame-0000.png... and skip ffmpeg. Mutually exclusive with output_path. |
| hide | array | — | Hide matching feature ids / assembly part names in the rendered frames. Mutually exclusive with focus. Render-only; does not affect pose verification. |
| no_verify | boolean | — | Skip the animation-pose interference verification (default: verify on). |
| output_path | string | — | MP4 output path; default <scriptDir>/<basename>-animation.mp4. Mutually exclusive with frames_dir. |
| verify_every | integer | — | Additionally verify at every n-th frame time of the fps schedule (unioned with the keyframe sample set). |
| Name | Type | Req | Description |
|---|---|---|---|
| collisions | array | — | Colliding poses { t_ms, a, b, volume_mm3 }. |
| diagnostics | array | yes | — |
| duration_ms | number | — | — |
| error | string | — | — |
| errorCode | string | — | — |
| errorHint | string | — | — |
| failure_kind | string | — | — |
| fps | number | — | — |
| frame_count | number | — | — |
| ok | boolean | yes | — |
| output_path | string | — | Written MP4 path (MP4 mode). |
| verified | boolean | — | Whether pose-interference verification passed. |
| verify_skipped | boolean | — | — |
No examples provided.
design_loop Run 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.
| Name | Type | Req | Description |
|---|---|---|---|
| allowReviewWarnings | array | — | Warning diagnostic codes the original prompt explicitly allows. Other review warnings keep the loop iterating even if review_cad is functionally ok. |
| assembly | string | — | — |
| attempts | array | yes | 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. |
| combinatorial | boolean | — | 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 fal… |
| epsilonMm3 | number | — | Forwarded to review_cad. |
| goal | string | yes | Original user design goal. Fed into every review_cad repair prompt. |
| gripperAperture | object | — | Optional gripper aperture request forwarded to review_cad. |
| includeInterference | boolean | — | Forwarded to review_cad. Default true. |
| includePoseEnvelope | boolean | — | Forwarded to review_cad. Default true. |
| outputRecordPath | string | — | Optional JSON path to write a Studio-compatible build record. |
| preserveInterfaces | array | — | External mates, connector refs, part names, or behavioral interfaces the agent must preserve between attempts. |
| recordTitle | string | — | Optional title for the build record. |
| requireVisualReview | boolean | — | Require screenshot-backed visualReview with structured checks before accepting an attempt. Default true; set false only for explicit non-visual batch checks. |
| samplesPerMate | integer | — | 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. |
| stopOnPass | boolean | — | Stop after the first attempt that is functional and passes the quality gate. Default true. |
| trackConnectors | array | — | Connector refs to track across sampled poses. |
| Name | Type | Req | Description |
|---|---|---|---|
| attempts | array | yes | Per-attempt review results. |
| finalAttemptId | string | — | — |
| goal | string | yes | Echoed design goal. |
| nextActionPrompt | string | — | — |
| ok | boolean | yes | — |
| outputRecordPath | string | — | — |
| record | object | — | Studio-compatible build record (when requested). |
| recordUrl | string | — | — |
No examples provided.
diff_scripts Diff CAD 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.
| Name | Type | Req | Description |
|---|---|---|---|
| baseCode | string | — | Baseline script — inline source. |
| baseFile | string | — | Baseline script — path to a .kcad.ts file. |
| code | string | — | Revised script — inline source. |
| file | string | — | Revised script — path to a .kcad.ts file. |
| Name | Type | Req | Description |
|---|---|---|---|
| base | object | — | Baseline summary { featureCount, partCount, isAssembly } (success). |
| diagnostics | array | — | — |
| error | string | — | Failure message (failure). |
| errorCode | string | — | — |
| interference | object | — | Total interference-volume delta + per-pair detail (success). |
| mates | object | — | Mate-graph changes (success). |
| ok | boolean | yes | — |
| params | object | — | Param value/min/max changes (success). |
| parts | object | — | Per-part added/removed/renamed/changed/unchanged (success). |
| revised | object | — | Revision summary { featureCount, partCount, isAssembly } (success). |
| side | string | — | Which side failed ('base' | 'revised') (failure). |
No examples provided.
evaluate_script Evaluate CAD 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.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | — | Inline kernelCAD script source. |
| dryRun | boolean | — | Fast validation only: skip OCCT lowering, DFM gates, and meshing. Does not set or clear the active session. |
| file | string | — | Path to a .kcad.ts script file. |
| Name | Type | Req | Description |
|---|---|---|---|
| diagnostics | array | yes | — |
| dryRun | boolean | — | True when the result came from a fast dry run. |
| featureCount | number | yes | Number of features captured by the script. |
| ok | boolean | yes | Whether the script compiled and lowered cleanly. |
| parts | object | — | Assembly parts summary { count, names } when the scene is assembly-built. |
No examples provided.
evaluate_sdf 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] }.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | — | Inline kernelCAD script source. |
| fieldName | string | yes | sdf.bind binding name holding the SdfField. |
| file | string | — | Path to a .kcad.ts script file. |
| point | array | yes | Sample point [x, y, z] in mm. |
| Name | Type | Req | Description |
|---|---|---|---|
| aabb | object | — | Axis-aligned bounding box of the field (success). |
| distance | number | — | Signed distance in mm; negative = inside (success). |
| error | string | — | — |
| errorCode | string | — | — |
| hint | string | — | — |
| inside | boolean | — | Whether the point is inside the surface (success). |
| kind | string | — | SDF field kind (success). |
| ok | boolean | yes | — |
No examples provided.
export 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…
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | — | Inline kernelCAD script source. |
| feature_id | string | — | target:'model' — optional FeatureId to export; defaults to last. |
| file | string | — | Path to a .kcad.ts script file. |
| format | string | — | target:'model' — output file format (required for that target). |
| no_verify | boolean | — | Skip the STL watertight verify gate. |
| options | object | — | target:'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_dir | string | — | target:'part' — destination directory (all-parts mode); files are <dir>/<part>.stl. |
| output_path | string | — | Destination path. target:'model' — the export file (required). target:'part' — single-part .stl path. |
| part | string | — | target:'part' — part name for single-part export, or 'all'. |
| target | string | yes | Which exporter to run: 'model' (whole-script geometry to one file) or 'part' (per-part STLs from a solved assembly). |
| Name | Type | Req | Description |
|---|---|---|---|
| byte_count | number | — | target:'model' — file size in bytes. |
| diagnostics | array | — | — |
| error | string | — | — |
| feature_count | number | — | — |
| format | string | — | — |
| mesh_files | array | — | Per-link mesh files for urdf/sdf-gazebo exports. |
| ok | boolean | yes | — |
| output_path | string | — | target:'model' — written file path. |
| written | array | — | target:'part' — per-part export records. |
No examples provided.
fetch_part 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.
| Name | Type | Req | Description |
|---|---|---|---|
| category | string | — | — |
| family | string | — | — |
| id | string | — | — |
| partsBaseUrl | string | — | Opt-in remote endpoint; no default value ships with kernelCAD. |
| query | string | — | — |
| standard | string | — | — |
| Name | Type | Req | Description |
|---|---|---|---|
| cachePath | string | — | Local cache path of the written STEP file (success). |
| error | string | — | — |
| errorCode | string | — | — |
| errorHint | string | — | — |
| ok | boolean | yes | — |
| record | object | — | Resolved part record (success). |
| sha256 | string | — | SHA-256 fingerprint of the STEP file (success). |
| source | string | — | Where the part came from ('local' | 'remote') (success). |
No examples provided.
find_part 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.
| Name | Type | Req | Description |
|---|---|---|---|
| category | string | — | — |
| family | string | — | — |
| limit | number | — | — |
| partsBaseUrl | string | — | Opt-in remote endpoint; no default value ships with kernelCAD. |
| query | string | — | — |
| source | string | — | — |
| standard | string | — | — |
| tag | string | — | — |
| Name | Type | Req | Description |
|---|---|---|---|
| error | string | — | — |
| errorCode | string | — | — |
| errorHint | string | — | — |
| ok | boolean | yes | — |
| remoteEnabled | boolean | — | Whether the remote tier was queried (success). |
| results | array | — | Matching part records (success). |
| source | string | — | Where results came from ('local' | 'remote') (success). |
| totalMatches | number | — | Total matches before limiting (success). |
No examples provided.
flatten_pattern Flatten Sheet-Metal 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.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | — | — |
| featureId | string | — | — |
| file | string | — | — |
| Name | Type | Req | Description |
|---|---|---|---|
| diagnostics | array | yes | — |
| ok | boolean | yes | — |
| region | object | — | Unfolded flat-pattern Region (outer polyline + holes + bend lines + plane). |
No examples provided.
get_latest_render 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.
| Name | Type | Req | Description |
|---|---|---|---|
| paths_only | boolean | — | 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 (smaller… |
| slug | string | yes | 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. |
| view | string | — | 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 th… |
| Name | Type | Req | Description |
|---|---|---|---|
| bytes | number | — | PNG byte length (when ok). |
| error | string | — | Error code when ok is false (e.g. "empty_geometry", "mesh_failed"). |
| height | number | — | Rendered image edge in px (when ok). |
| hint | string | — | Next-action hint when ok is false. |
| image_b64 | string | — | Base64-encoded PNG bytes, present when inlined (paths_only=false) and under the size cap. |
| ok | boolean | — | Whether a render was produced. |
| truncated | boolean | — | Set when inline was requested but the PNG exceeded the size cap. |
| view | string | — | The view that was rendered (when ok). |
| width | number | — | Rendered image edge in px (when ok). |
No examples provided.
get_model_mesh 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.
| Name | Type | Req | Description |
|---|---|---|---|
| slug | string | yes | Project slug from open_in_studio/get_project. |
Structured output declared, but exposes no named fields.
No examples provided.
get_project 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.
| Name | Type | Req | Description |
|---|---|---|---|
| slug | string | — | The project slug from a listing or a /p/<slug> Studio link. Omit to list the signed-in user's saved projects. |
| Name | Type | Req | Description |
|---|---|---|---|
| assets | object | — | Complementary files keyed by source-relative path. |
| code | string | — | Fetch mode: the full .kcad source. |
| ok | boolean | — | Whether the read succeeded. |
| parameters | array | — | Fetch mode: the model's editable parameters. |
| privacy | string | — | Fetch mode: the project privacy. |
| projects | array | — | List mode (no slug): the user's saved projects. |
| slug | string | — | Fetch mode: the project slug. |
| title | string | — | Fetch mode: the project title. |
| updated_at | string | — | Fetch mode: last-updated timestamp. |
| version | number | — | Fetch mode: the project version. |
No examples provided.
get_project_revision 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.
| Name | Type | Req | Description |
|---|---|---|---|
| slug | string | yes | Project slug returned by open_in_studio. |
| version | integer | yes | Positive immutable revision version returned by open_in_studio. |
| Name | Type | Req | Description |
|---|---|---|---|
| assets | object | — | Immutable complementary-file manifest. |
| code | string | yes | Exact .kcad source captured at this revision. |
| ok | boolean | yes | Whether the revision was found and readable. |
| parameters | array | yes | Exact editable parameters captured at this revision. |
| slug | string | yes | Project slug. |
| version | integer | yes | Immutable revision version. |
No examples provided.
inspect Inspect Model ~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 }.
| Name | Type | Req | Description |
|---|---|---|---|
| assembly | string | — | of:'assembly'|'robot' — assembly name; defaults to the first captured assembly. |
| category | string | — | of:'part-families' — optional top-level category to filter families by. |
| code | string | — | Inline kernelCAD script source. |
| face_name | string | — | of:'face-edges' — canonical face name (required for that subject). |
| feature_id | string | — | of:'shape'|'topology'|'edges'|'faces'|'face-edges'|'face-labels' — FeatureId; defaults to the last returned shape. |
| file | string | — | Path to a .kcad.ts script file. |
| of | string | yes | Which facts to read. |
| query | object | — | of:'edges'|'faces' — optional EdgeQuery/FaceQuery filter. |
| Name | Type | Req | Description |
|---|---|---|---|
| error | string | — | Failure message (present on failure). |
| errorCode | string | — | — |
| ok | boolean | — | Whether the read succeeded. |
No examples provided.
lookup_api Look Up 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.
| Name | Type | Req | Description |
|---|---|---|---|
| constraints | object | — | — |
| curve3dAnalyticsMethods | array | — | — |
| curve3dMethods | array | — | — |
| edgeQueryKeys | array | — | — |
| error | string | — | — |
| faceQueryKeys | array | — | — |
| featureKindFaceLabels | object | — | — |
| globals | array | — | — |
| ok | boolean | yes | — |
| paramRefMethods | array | — | — |
| pathBuilderMethods | array | — | — |
| sceneMethods | array | — | — |
| scenePartProperties | array | — | — |
| shapeMethods | array | — | — |
| sketchMethods | array | — | — |
| surfaceMethods | array | — | — |
No examples provided.
lookup_authoring_skill Look Up 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.
| Name | Type | Req | Description |
|---|---|---|---|
| mimeType | string | — | MIME type of the returned body. |
| text | string | — | The SKILL.md body. |
| uri | string | — | The authoring-skill resource URI. |
No examples provided.
lookup_cookbook Look Up 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.
| Name | Type | Req | Description |
|---|---|---|---|
| k | number | — | Max snippets to return. Default 3, max 5. |
| query | string | yes | Natural-language description of what you want to do (e.g. "round the rim of a hole", "build an L-bracket"). |
| Name | Type | Req | Description |
|---|---|---|---|
| error | string | — | — |
| hits | array | — | Top-k matching cookbook snippets, ranked by BM25. |
| ok | boolean | yes | — |
No examples provided.
lookup_diagnostics Look Up 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.
| Name | Type | Req | Description |
|---|---|---|---|
| codes | array | yes | The diagnostic-code catalogue with hint templates. |
| ok | boolean | yes | — |
No examples provided.
mesh_summary Summarize Mesh Geometry ~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.
| Name | Type | Req | Description |
|---|---|---|---|
| fileName | string | — | Optional file-name label used in diagnostics (does not affect geometry). |
| params | object | — | Optional map of parameter-name → numeric value, applied as overrides before meshing (stateless slider recompute). |
| source | string | yes | The .kcad.ts script source to mesh. |
| Name | Type | Req | Description |
|---|---|---|---|
| bounds | object | — | Overall model bounding box. |
| diagnostics | array | — | Kernel diagnostics, if any. |
| failedFeatureIds | array | — | Feature ids that failed to compile (empty when ok). |
| featureCount | number | — | Number of features in the meshed model. |
| features | array | — | Per-feature summary — never includes raw mesh arrays. |
| ok | boolean | — | True when every feature meshed successfully. |
No examples provided.
open_in_studio 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.
| Name | Type | Req | Description |
|---|---|---|---|
| attachments | array | — | Complementary project files referenced by relative path from the .kcad source. |
| code | string | — | 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. |
| parameters | array | — | Optional list of the model's editable parameters, so Studio can render parameter controls. Each item is one control derived from the .kcad params. |
| slug | string | — | Slug 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. |
| title | string | — | Optional human-readable title for the model (shown in Studio). Defaults to "Model from Claude". |
| Name | Type | Req | Description |
|---|---|---|---|
| assetHashes | array | — | — |
| attachmentCount | integer | — | — |
| embedUrl | string | — | Read-only, chrome-free /embed/<slug> viewer URL — drop into an <iframe> to embed the live model in any site or widget (no login). |
| ok | boolean | — | Whether the model was persisted. |
| slug | string | — | The project slug; pass it back to update this project in place. |
| updated | boolean | — | True when an existing project was updated; false when a new one was created. |
| url | string | — | The /p/<slug> Studio link for the model. |
| version | integer | — | Immutable Studio revision persisted by this call. Read it with get_project_revision using this slug and version. |
No examples provided.
project_curve 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.
| Name | Type | Req | Description |
|---|---|---|---|
| asEdge | boolean | — | Project as an open edge instead of a closed face-bound sketch. Currently deferred. |
| bindAs | string | — | Optional local variable name; emits `const <bindAs> = <target>.projectCurve(...);`. |
| code | string | yes | The .kcad.ts source code. |
| curveExpression | string | yes | JS 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. |
| face | string | yes | Target face — canonical name or label. |
| scaleMode | string | — | Drawing.sketchOnFace scaling mode. Default original. |
| target | string | yes | Variable name of the Shape to chain onto. |
| Name | Type | Req | Description |
|---|---|---|---|
| binding_name | string | — | JS const name bound to the new construct (when one was created). |
| diagnostics | array | — | Diagnostics from re-evaluating the modified source. |
| error | string | — | Failure message (present when ok is false). |
| new_code | string | — | Modified .kcad.ts source (present on success). Caller persists it. |
| ok | boolean | yes | Whether the edit applied and re-evaluated cleanly. |
No examples provided.
query Query Geometry ~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.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | — | Inline kernelCAD script source. |
| expect | string | — | mode:'evaluate' — 'unique' asserts exactly-one. |
| feature_id | string | — | Optional FeatureId; defaults to the last lowered shape (use "auto" for lineage). |
| file | string | — | Path to a .kcad.ts script file. |
| mode | string | — | Resolution mode (default 'evaluate'). |
| query | — | — | mode:'evaluate' — Query input: @kc[...] / @kcq[...] string or { ast } object. |
| ref | string | — | mode:'resolve'|'lineage' — topology ref string. |
| Name | Type | Req | Description |
|---|---|---|---|
| candidates | array | — | mode:'resolve' — near-miss candidates (failure). |
| chain | array | — | mode:'lineage' — HistoryMap walk. |
| entities | array | — | mode:'evaluate' — matched entities. |
| entity | object | — | mode:'resolve' — the single matched entity. |
| error | string | — | — |
| errorCode | string | — | — |
| ok | boolean | yes | — |
| query | object | — | mode:'evaluate' — the resolved Query ({ ast }). |
| ref | string | — | mode:'resolve' — the resolved ref string. |
| warnings | array | — | — |
No examples provided.