Inspect Model
inspectUse this when you need to read facts about a model. One reader, selected by of:
'assembly' — physical assembly inventory (parts, bboxes, connectors, mates, disconnected solids).
'robot' — URDF/SDFormat export preview (links, joints, planning groups, end-effectors, issues).
'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
ofare subject-specific and forwarded verbatim. Most subjects accept { file | code }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| of | Yes | Which facts to read. | |
| code | No | Inline kernelCAD script source. | |
| file | No | Path to a .kcad.ts script file. | |
| query | No | of:'edges'|'faces' — optional EdgeQuery/FaceQuery filter. | |
| assembly | No | of:'assembly'|'robot' — assembly name; defaults to the first captured assembly. | |
| category | No | of:'part-families' — optional top-level category to filter families by. | |
| face_name | No | of:'face-edges' — canonical face name (required for that subject). | |
| feature_id | No | of:'shape'|'topology'|'edges'|'faces'|'face-edges'|'face-labels' — FeatureId; defaults to the last returned shape. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Whether the read succeeded. | |
| error | No | Failure message (present on failure). | |
| errorCode | No |