Skip to main content
Glama

Review CAD Model

review_cad
Read-only

Use this when you need to review a mechanism for fitness and repair mode. Run the deterministic CAD review loop: evaluate the script, validate the assembly/mate graph, check mate connectors touch modeled material, sample declared mate limits, optionally check interferences at sampled poses, report connector workspace bounds, and return a mechanism fitness verdict for agent self-review. Fitness includes repairMode: none, local-fix, parameter-tune, or topology-redesign. Runs within timeBudgetMs (default 90 s): stages that did not fit are listed in skippedStages (their checks did not run; mechanism is then unverified) and stageTimingsMs shows per-stage cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoInline kernelCAD script source.
fileNoPath to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
assemblyNoAssembly name; defaults to the first captured assembly.
designGoalNoOriginal user design prompt or goal. Included in suggestedRepairPrompt so topology-redesign repairs restart from the intended physical design instead of local coordinate nudges.
epsilonMm3NoInterference volume threshold in mm^3. Default 0.01.
timeBudgetMsNoWall-clock budget for the review in ms (default 90000). Once spent, the remaining heavy stages (pose envelope, physical use case, mechanism sweep) are skipped and listed in skippedStages — a partial result instead of a timeout. stageTimingsMs reports where the time went.
combinatorialNoSample 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 false.
samplesPerMateNoPose-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.
gripperApertureNoOptional fingertip connector refs for gripper aperture travel reporting.
trackConnectorsNoOptional connector refs such as ["gripper-plate.tool-tip"] to limit connector workspace reporting.
preserveInterfacesNoExternal mates, connector refs, part names, or behavioral interfaces the repair agent must preserve during redesign.
includeInterferenceNoWhether sampled poses run BREP interference checks. Default true.
includePoseEnvelopeNoWhether to sample declared mate limits. Default true.
requirePhysicalUseCaseNoWhen true, articulated assemblies must declare arm.physicalUseCase(...) evidence: loads, contacts, stable parts, and actuator limits.
includePhysicalUseCaseStaticsNoRun opt-in pose-bound quasi-static certification at the exact common-contact samples: conservative friction/capacity, world force and moment balance, and finite-difference revolute actuator torque. Returns physicalUseCaseStaticCertificates on success; sampled linearized failures remain blocking diagnostics.
includePhysicalUseCaseReachabilityNoRun targeted physical-use-case reachability sampling over scalar-limited mates named in actuatorLimits. Reject contacts that cannot get within criteria.maxSlipMm and multi-contact use cases that cannot satisfy every contact in the same sampled actuator pose. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Defaults to requirePhysicalUseCase.
includePhysicalUseCaseJointReactionsNoDerive exact-pose reaction wrenches through uniquely rooted articulated trees and compare every loaded mate against a complete declared resultant force/moment envelope. Implies physical-use-case reachability and statics.
includePhysicalUseCaseJointStructureNoRun geometry/material clevis double-shear, pin-bending, bearing, tear-out, and net-section checks with minimum factor of safety 2. Unsupported axial or perpendicular-moment load cases remain blockers. Implies joint reactions, statics, and reachability.
physicalUseCaseReachabilitySamplesPerMateNoSamples per scalar-limited actuator mate for physical-use-case contact reachability. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Default 3; total targeted combinations are capped.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "assembly": {
      -    "type": "string"
      -  },
      -  "connectorWorkspace": {
      -    "description": "Connector workspace bounds.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "diagnostics": {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "featureCount": {
      -    "type": "number"
      -  },
      -  "fitness": {
      -    "additionalProperties": true,
      -    "description": "Mechanism fitness verdict incl. repairMode.",
      -    "type": "object"
      -  },
      -  "gripperAperture": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "interferenceSummary": {
      -    "additionalProperties": true,
      -    "description": "Classified interference counts and pairs: raw, contact-noise, actionable, and capMm3.",
      -    "type": "object"
      -  },
      -  "mechanism": {
      -    "type": "string"
      -  },
      -  "mechanismFailures": {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  },
      -  "physicalUseCaseJointReactionCertificates": {
      -    "description": "Exact-pose parent-on-child joint reaction wrench certificates in N, mm, and Nmm.",
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "poses": {
      -          "additionalProperties": true,
      -          "type": "object"
      -        },
      -        "reactions": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "axialForceN": {
      -                "type": "number"
      -              },
      -              "axisMomentNmm": {
      -                "type": "number"
      -              },
      -              "axisWorld": {
      -                "items": {
      -                  "type": "number"
      -                },
      -                "type": "array"
      -              },
      -              "bendingMomentNmm": {
      -                "type": "number"
      -              },
      -              "childPart": {
      -                "type": "string"
      -              },
      -              "forceWorldN": {
      -                "items": {
      -                  "type": "number"
      -                },
      -                "type": "array"
      -              },
      -              "mateName": {
      -                "type": "string"
      -              },
      -              "momentWorldNmm": {
      -                "items": {
      -                  "type": "number"
      -                },
      -                "type": "array"
      -              },
      -              "parentPart": {
      -                "type": "string"
      -              },
      -              "pointWorldMm": {
      -                "items": {
      -                  "type": "number"
      -                },
      -                "type": "array"
      -              },
      -              "radialForceN": {
      -                "type": "number"
      -              },
      -              "resultantForceN": {
      -                "type": "number"
      -              },
      -              "resultantMomentNmm": {
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "mateName",
      -              "parentPart",
      -              "childPart",
      -              "pointWorldMm",
      -              "axisWorld",
      -              "forceWorldN",
      -              "momentWorldNmm",
      -              "resultantForceN",
      -              "resultantMomentNmm",
      -              "axialForceN",
      -              "radialForceN",
      -              "axisMomentNmm",
      -              "bendingMomentNmm"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        "useCaseName": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "useCaseName",
      -        "poses",
      -        "reactions"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "physicalUseCaseJointStructuralCertificates": {
      -    "description": "Per-joint declared-envelope and geometry/material clevis strength evidence.",
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "joints": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "envelope": {
      -                "additionalProperties": true,
      -                "type": "object"
      -              },
      -              "mateName": {
      -                "type": "string"
      -              },
      -              "structure": {
      -                "additionalProperties": true,
      -                "type": "object"
      -              }
      -            },
      -            "required": [
      -              "mateName",
      -              "envelope"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        "poses": {
      -          "additionalProperties": true,
      -          "type": "object"
      -        },
      -        "useCaseName": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "useCaseName",
      -        "poses",
      -        "joints"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "physicalUseCaseStaticCertificates": {
      -    "description": "Verified sampled quasi-static certificates with residual wrench, contact forces, and actuator torque evidence.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "poseEnvelope": {
      -    "additionalProperties": true,
      -    "description": "Sampled mate-limit pose envelope.",
      -    "type": "object"
      -  },
      -  "rawInterferencePairs": {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "repairContext": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "skippedStages": {
      -    "description": "Stages skipped because timeBudgetMs was spent; their checks did not run.",
      -    "items": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "reason": {
      -          "type": "string"
      -        },
      -        "stage": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "stageTimingsMs": {
      -    "additionalProperties": {
      -      "type": "number"
      -    },
      -    "description": "Wall-clock ms per review stage that ran.",
      -    "type": "object"
      -  },
      -  "suggestedRepairPrompt": {
      -    "description": "Structured repair prompt (failure / repair path).",
      -    "type": "string"
      -  },
      -  "validator": {
      -    "additionalProperties": true,
      -    "description": "Assembly/mate-graph validator result.",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok",
      -  "featureCount",
      -  "diagnostics"
      -]
  2. Changed3 schema fields changed
    • addedInput schema / properties / timeBudgetMs
      Added value: +{
      +  "description": "Wall-clock budget for the review in ms (default 90000). Once spent, the remaining heavy stages (pose envelope, physical use case, mechanism sweep) are skipped and listed in skippedStages — a partial result instead of a timeout. stageTimingsMs reports where the time went.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / skippedStages
      Added value: +{
      +  "description": "Stages skipped because timeBudgetMs was spent; their checks did not run.",
      +  "items": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "reason": {
      +        "type": "string"
      +      },
      +      "stage": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / stageTimingsMs
      Added value: +{
      +  "additionalProperties": {
      +    "type": "number"
      +  },
      +  "description": "Wall-clock ms per review stage that ran.",
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous value: -"Path to a .kcad.ts script file."New value: +"Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project."
  4. Changed10 schema fields changed
    • addedInput schema / properties / includePhysicalUseCaseJointReactions
      Added value: +{
      +  "description": "Derive exact-pose reaction wrenches through uniquely rooted articulated trees and compare every loaded mate against a complete declared resultant force/moment envelope. Implies physical-use-case reachability and statics.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includePhysicalUseCaseJointStructure
      Added value: +{
      +  "description": "Run geometry/material clevis double-shear, pin-bending, bearing, tear-out, and net-section checks with minimum factor of safety 2. Unsupported axial or perpendicular-moment load cases remain blockers. Implies joint reactions, statics, and reachability.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includePhysicalUseCaseReachability
      Added value: +{
      +  "description": "Run targeted physical-use-case reachability sampling over scalar-limited mates named in actuatorLimits. Reject contacts that cannot get within criteria.maxSlipMm and multi-contact use cases that cannot satisfy every contact in the same sampled actuator pose. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Defaults to requirePhysicalUseCase.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includePhysicalUseCaseStatics
      Added value: +{
      +  "description": "Run opt-in pose-bound quasi-static certification at the exact common-contact samples: conservative friction/capacity, world force and moment balance, and finite-difference revolute actuator torque. Returns physicalUseCaseStaticCertificates on success; sampled linearized failures remain blocking diagnostics.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / physicalUseCaseReachabilitySamplesPerMate
      Added value: +{
      +  "description": "Samples per scalar-limited actuator mate for physical-use-case contact reachability. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Default 3; total targeted combinations are capped.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / requirePhysicalUseCase
      Added value: +{
      +  "description": "When true, articulated assemblies must declare arm.physicalUseCase(...) evidence: loads, contacts, stable parts, and actuator limits.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / interferenceSummary
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Classified interference counts and pairs: raw, contact-noise, actionable, and capMm3.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / physicalUseCaseJointReactionCertificates
      Added value: +{
      +  "description": "Exact-pose parent-on-child joint reaction wrench certificates in N, mm, and Nmm.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "poses": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "reactions": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "axialForceN": {
      +              "type": "number"
      +            },
      +            "axisMomentNmm": {
      +              "type": "number"
      +            },
      +            "axisWorld": {
      +              "items": {
      +                "type": "number"
      +              },
      +              "type": "array"
      +            },
      +            "bendingMomentNmm": {
      +              "type": "number"
      +            },
      +            "childPart": {
      +              "type": "string"
      +            },
      +            "forceWorldN": {
      +              "items": {
      +                "type": "number"
      +              },
      +              "type": "array"
      +            },
      +            "mateName": {
      +              "type": "string"
      +            },
      +            "momentWorldNmm": {
      +              "items": {
      +                "type": "number"
      +              },
      +              "type": "array"
      +            },
      +            "parentPart": {
      +              "type": "string"
      +            },
      +            "pointWorldMm": {
      +              "items": {
      +                "type": "number"
      +              },
      +              "type": "array"
      +            },
      +            "radialForceN": {
      +              "type": "number"
      +            },
      +            "resultantForceN": {
      +              "type": "number"
      +            },
      +            "resultantMomentNmm": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "mateName",
      +            "parentPart",
      +            "childPart",
      +            "pointWorldMm",
      +            "axisWorld",
      +            "forceWorldN",
      +            "momentWorldNmm",
      +            "resultantForceN",
      +            "resultantMomentNmm",
      +            "axialForceN",
      +            "radialForceN",
      +            "axisMomentNmm",
      +            "bendingMomentNmm"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "useCaseName": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "useCaseName",
      +      "poses",
      +      "reactions"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / physicalUseCaseJointStructuralCertificates
      Added value: +{
      +  "description": "Per-joint declared-envelope and geometry/material clevis strength evidence.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "joints": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "envelope": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "mateName": {
      +              "type": "string"
      +            },
      +            "structure": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "mateName",
      +            "envelope"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "poses": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "useCaseName": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "useCaseName",
      +      "poses",
      +      "joints"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / physicalUseCaseStaticCertificates
      Added value: +{
      +  "description": "Verified sampled quasi-static certificates with residual wrench, contact forces, and actuator torque evidence.",
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. Changed3 schema fields changed
    • removedOutput schema / properties / connectorWorkspace / additionalProperties
      Removed value: -true
    • addedOutput schema / properties / connectorWorkspace / items
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • changedOutput schema / properties / connectorWorkspace / type
      Previous value: -"object"New value: +"array"
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "assembly": {
      +      "type": "string"
      +    },
      +    "connectorWorkspace": {
      +      "additionalProperties": true,
      +      "description": "Connector workspace bounds.",
      +      "type": "object"
      +    },
      +    "diagnostics": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "featureCount": {
      +      "type": "number"
      +    },
      +    "fitness": {
      +      "additionalProperties": true,
      +      "description": "Mechanism fitness verdict incl. repairMode.",
      +      "type": "object"
      +    },
      +    "gripperAperture": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "mechanism": {
      +      "type": "string"
      +    },
      +    "mechanismFailures": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "poseEnvelope": {
      +      "additionalProperties": true,
      +      "description": "Sampled mate-limit pose envelope.",
      +      "type": "object"
      +    },
      +    "rawInterferencePairs": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "repairContext": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "suggestedRepairPrompt": {
      +      "description": "Structured repair prompt (failure / repair path).",
      +      "type": "string"
      +    },
      +    "validator": {
      +      "additionalProperties": true,
      +      "description": "Assembly/mate-graph validator result.",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "featureCount",
      +    "diagnostics"
      +  ],
      +  "type": "object"
      +}
  7. Changed1 schema field changed
    • addedInput schema / properties / gripperAperture
      Added value: +{
      +  "description": "Optional fingertip connector refs for gripper aperture travel reporting.",
      +  "properties": {
      +    "left": {
      +      "description": "Left fingertip connector ref such as \"left-finger.tip\".",
      +      "type": "string"
      +    },
      +    "right": {
      +      "description": "Right fingertip connector ref such as \"right-finger.tip\".",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  8. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.