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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoInline kernelCAD script source.
fileNoPath to a .kcad.ts script file.
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.
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
okYes
fitnessNoMechanism fitness verdict incl. repairMode.
assemblyNo
mechanismNo
validatorNoAssembly/mate-graph validator result.
diagnosticsYes
featureCountYes
poseEnvelopeNoSampled mate-limit pose envelope.
repairContextNo
gripperApertureNo
mechanismFailuresNo
connectorWorkspaceNoConnector workspace bounds.
interferenceSummaryNoClassified interference counts and pairs: raw, contact-noise, actionable, and capMm3.
rawInterferencePairsNo
suggestedRepairPromptNoStructured repair prompt (failure / repair path).
physicalUseCaseStaticCertificatesNoVerified sampled quasi-static certificates with residual wrench, contact forces, and actuator torque evidence.
physicalUseCaseJointReactionCertificatesNoExact-pose parent-on-child joint reaction wrench certificates in N, mm, and Nmm.
physicalUseCaseJointStructuralCertificatesNoPer-joint declared-envelope and geometry/material clevis strength evidence.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
  3. 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"
      +}
  4. 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"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral context beyond that: it is deterministic, it follows a specific review loop, it can optionally check interferences and pose envelopes, and it returns one of four repairMode verdicts. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and front-loaded with the core use case, then enumerates the review steps and verdict types. It is longer than average, but for an 18-parameter tool with many optional behaviors, the detail is substantive rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex with 18 optional parameters, but the schema covers parameter-level details and the output schema covers returns. The description supplies the missing decision-level context: when to use it, what process it runs, what optional checks exist, and what the fitness verdict means. Nothing needed to call it correctly is omitted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all 18 parameters thoroughly. The description adds high-level meaning by connecting the review loop to the parameters, but it does not need to compensate for gaps. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('review'), a specific resource ('a mechanism'), and a distinctive outcome: a fitness verdict with repair mode categories. It differentiates itself from siblings by describing the deterministic CAD review loop and the self-review purpose, so an agent can tell it apart from similar tools like verify or inspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly opens with 'Use this when you need to review a mechanism for fitness and repair mode,' providing a clear invocation condition. It does not name alternatives or explicitly state when not to use it, so it stops just short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.