Skip to main content
Glama

Sweep Tolerance Range

sweep_tolerance
Read-onlyIdempotent

Use this when you need to know where and why a design breaks across a tolerance/dimension range, not just whether it builds at one nominal value. Declares one or more param() names with a { values: [...] } list or a { min, max, steps } range (number params are bisected; choice/string params are evaluated as discrete points), re-evaluates the script once per cartesian-product combination (capped at 64 combos — exceeding it truncates to the first 64 and emits kinematic.sweep-tolerance.combo-cap-exceeded), and measures every requirement in the S2 ledger (script require(), dfmSpec, gated FEA, mechanical intent) plus the standard gates on each combo: interference, mounting-hole diameter agreement, and joint-axis binding (all three default on); reachability only when gates.reachable names a tip_link + target. After the coarse grid it bisects each numeric pass/fail transition down to boundary_tolerance and reports the boundary value, the failing side, and the binding requirement/gate names (e.g. "wall fails below 1.840 mm; binding: wall"). Returns per-combo verdicts, firstFailure per gate, firstRequirementFailure per requirement, boundaries[], and a coverage statement that says "checked at N points plus boundaries", never "proven".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "params": "<params>"
    },
    "name": "sweep_tolerance"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoInline kernelCAD script source.
fileNoPath to a .kcad.ts script file. Hosted: `code`, `project:<slug>` (head), or a Studio `/p/<slug>?version=N` link (pinned); no local files.
gatesNoWhich standard gates to run per combo.
paramsYesparam() name -> { values: [number|string, ...] } or { min, max, steps }.
assemblyNoAssembly name; defaults to the first captured assembly.
boundary_budgetNoMaximum extra evaluations spent bisecting boundaries. Default 64; 0 skips bisection.
boundary_toleranceNoAbsolute parameter tolerance for boundary bisection. Default 0.001.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous 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."New value: +"Path to a .kcad.ts script file. Hosted: `code`, `project:<slug>` (head), or a Studio `/p/<slug>?version=N` link (pinned); no local files."
  2. Changed15 schema fields changed
    • removedInput schema / properties / boundaryBudget
      Removed value: -{
      -  "description": "Maximum extra evaluations spent bisecting boundaries. Default 64; 0 skips bisection.",
      -  "type": "number"
      -}
    • removedInput schema / properties / boundaryTolerance
      Removed value: -{
      -  "description": "Absolute parameter tolerance for boundary bisection. Default 0.001.",
      -  "type": "number"
      -}
    • addedInput schema / properties / boundary_budget
      Added value: +{
      +  "description": "Maximum extra evaluations spent bisecting boundaries. Default 64; 0 skips bisection.",
      +  "type": "number"
      +}
    • addedInput schema / properties / boundary_tolerance
      Added value: +{
      +  "description": "Absolute parameter tolerance for boundary bisection. Default 0.001.",
      +  "type": "number"
      +}
    • removedInput schema / properties / gates / properties / jointAxis
      Removed value: -{
      -  "description": "Default true.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / gates / properties / joint_axis
      Added value: +{
      +  "description": "Default true.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / gates / properties / mountingHoles
      Removed value: -{
      -  "description": "Default true.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / gates / properties / mounting_holes
      Added value: +{
      +  "description": "Default true.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / gates / properties / reachable / properties / targetOrientation
      Removed value: -{
      -  "items": {
      -    "type": "number"
      -  },
      -  "maxItems": 3,
      -  "minItems": 3,
      -  "type": "array"
      -}
    • removedInput schema / properties / gates / properties / reachable / properties / targetPosition
      Removed value: -{
      -  "items": {
      -    "type": "number"
      -  },
      -  "maxItems": 3,
      -  "minItems": 3,
      -  "type": "array"
      -}
    • addedInput schema / properties / gates / properties / reachable / properties / target_orientation
      Added value: +{
      +  "items": {
      +    "type": "number"
      +  },
      +  "maxItems": 3,
      +  "minItems": 3,
      +  "type": "array"
      +}
    • addedInput schema / properties / gates / properties / reachable / properties / target_position
      Added value: +{
      +  "items": {
      +    "type": "number"
      +  },
      +  "maxItems": 3,
      +  "minItems": 3,
      +  "type": "array"
      +}
    • removedInput schema / properties / gates / properties / reachable / properties / tipLink
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / gates / properties / reachable / properties / tip_link
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / gates / properties / reachable / required
      Previous value: -[
      -  "tipLink",
      -  "targetPosition"
      -]New value: +[
      +  "tip_link",
      +  "target_position"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / boundaryBudget
      Added value: +{
      +  "description": "Maximum extra evaluations spent bisecting boundaries. Default 64; 0 skips bisection.",
      +  "type": "number"
      +}
    • addedInput schema / properties / boundaryTolerance
      Added value: +{
      +  "description": "Absolute parameter tolerance for boundary bisection. Default 0.001.",
      +  "type": "number"
      +}
  4. Changed2 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "combosCapped": {
      -    "description": "True when the full cartesian product exceeded the 64-combo cap.",
      -    "type": "boolean"
      -  },
      -  "combosEvaluated": {
      -    "description": "Number of combos actually evaluated (capped at 64).",
      -    "type": "number"
      -  },
      -  "diagnostics": {
      -    "description": "Sweep-level diagnostics (e.g. combo-cap-exceeded).",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "error": {
      -    "type": "string"
      -  },
      -  "errorCode": {
      -    "type": "string"
      -  },
      -  "firstFailure": {
      -    "additionalProperties": true,
      -    "description": "First failing combo per gate name.",
      -    "type": "object"
      -  },
      -  "ok": {
      -    "description": "Whether every gate passed on every evaluated combo.",
      -    "type": "boolean"
      -  },
      -  "results": {
      -    "description": "One entry per evaluated combo: { combo, gates, diagnostics }.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok"
      -]
  5. 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."
  6. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.