Skip to main content
Glama

Add Mate

add_mate

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aNorelation:'mate' — connector ref "<partName>.<connectorName>".
bNorelation:'mate' — connector ref "<partName>.<connectorName>".
codeYesThe .kcad.ts source code.
kindNorelation:'transmission' — transmission kind.
nameNorelation:'mate'|'transmission' — name unique within the assembly.
pathNorelation:'transmission' — drive path.
poseNorelation:'mate' — optional mate pose.
typeNorelation:'mate' — mate type.
inputNorelation:'transmission' — optional input.
notesNorelation:'transmission' — optional notes.
ratioNorelation:'coupling' — driven pose = source pose * ratio + offset.
drivenNorelation:'coupling' — driven mate name.
offsetNorelation:'coupling' — optional pose offset.
outputNorelation:'transmission' — optional output.
sourceNorelation:'coupling' — source mate name.
actuatorNorelation:'transmission' — optional actuator.
limitsMmNorelation:'mate' — optional [minMm, maxMm].
relationNoWhich relationship to author (default 'mate').
limitsDegNorelation:'mate' — optional [minDeg, maxDeg].
sourceMateNorelation:'transmission' — source mate name.
drivenMatesNorelation:'transmission' — driven mate names.
assembly_bindingYesJS identifier bound to assembly(...).

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: -{
      -  "binding_name": {
      -    "description": "JS const name bound to the new construct (when one was created).",
      -    "type": "string"
      -  },
      -  "diagnostics": {
      -    "description": "Diagnostics from re-evaluating the modified source.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "error": {
      -    "description": "Failure message (present when ok is false).",
      -    "type": "string"
      -  },
      -  "new_code": {
      -    "description": "Modified .kcad.ts source (present on success). Caller persists it.",
      -    "type": "string"
      -  },
      -  "ok": {
      -    "description": "Whether the edit applied and re-evaluated cleanly.",
      -    "type": "boolean"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok"
      -]
  2. Changed1 schema field changed
    • changedInput schema / allOf
      Previous value: -[
      -  {
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "const": "coupling"
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {
      -      "required": [
      -        "driven",
      -        "source",
      -        "ratio"
      -      ]
      -    }
      -  },
      -  {
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "const": "transmission"
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {
      -      "required": [
      -        "name",
      -        "kind",
      -        "sourceMate",
      -        "drivenMates",
      -        "path"
      -      ]
      -    }
      -  },
      -  {
      -    "else": {
      -      "required": [
      -        "name",
      -        "a",
      -        "b",
      -        "type"
      -      ]
      -    },
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "enum": [
      -            "coupling",
      -            "transmission"
      -          ]
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {}
      -  }
      -]New value: +[
      +  {
      +    "if": {
      +      "anyOf": [
      +        {
      +          "not": {
      +            "required": [
      +              "relation"
      +            ]
      +          }
      +        },
      +        {
      +          "properties": {
      +            "relation": {
      +              "const": "mate"
      +            }
      +          },
      +          "required": [
      +            "relation"
      +          ]
      +        }
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "name",
      +        "a",
      +        "b",
      +        "type"
      +      ]
      +    }
      +  },
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "coupling"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "driven",
      +        "source",
      +        "ratio"
      +      ]
      +    }
      +  },
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "transmission"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "name",
      +        "kind",
      +        "sourceMate",
      +        "drivenMates",
      +        "path"
      +      ]
      +    }
      +  }
      +]
  3. Changed1 schema field changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "coupling"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "driven",
      +        "source",
      +        "ratio"
      +      ]
      +    }
      +  },
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "transmission"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "name",
      +        "kind",
      +        "sourceMate",
      +        "drivenMates",
      +        "path"
      +      ]
      +    }
      +  },
      +  {
      +    "else": {
      +      "required": [
      +        "name",
      +        "a",
      +        "b",
      +        "type"
      +      ]
      +    },
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "enum": [
      +            "coupling",
      +            "transmission"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {}
      +  }
      +]
  4. Changed1 schema field changed
    • removedInput schema / allOf
      Removed value: -[
      -  {
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "const": "coupling"
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {
      -      "required": [
      -        "driven",
      -        "source",
      -        "ratio"
      -      ]
      -    }
      -  },
      -  {
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "const": "transmission"
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {
      -      "required": [
      -        "name",
      -        "kind",
      -        "sourceMate",
      -        "drivenMates",
      -        "path"
      -      ]
      -    }
      -  },
      -  {
      -    "else": {
      -      "required": [
      -        "name",
      -        "a",
      -        "b",
      -        "type"
      -      ]
      -    },
      -    "if": {
      -      "properties": {
      -        "relation": {
      -          "enum": [
      -            "coupling",
      -            "transmission"
      -          ]
      -        }
      -      },
      -      "required": [
      -        "relation"
      -      ]
      -    },
      -    "then": {}
      -  }
      -]
  5. Changed1 schema field changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "coupling"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "driven",
      +        "source",
      +        "ratio"
      +      ]
      +    }
      +  },
      +  {
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "const": "transmission"
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "name",
      +        "kind",
      +        "sourceMate",
      +        "drivenMates",
      +        "path"
      +      ]
      +    }
      +  },
      +  {
      +    "else": {
      +      "required": [
      +        "name",
      +        "a",
      +        "b",
      +        "type"
      +      ]
      +    },
      +    "if": {
      +      "properties": {
      +        "relation": {
      +          "enum": [
      +            "coupling",
      +            "transmission"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "relation"
      +      ]
      +    },
      +    "then": {}
      +  }
      +]
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "binding_name": {
      +      "description": "JS const name bound to the new construct (when one was created).",
      +      "type": "string"
      +    },
      +    "diagnostics": {
      +      "description": "Diagnostics from re-evaluating the modified source.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "description": "Failure message (present when ok is false).",
      +      "type": "string"
      +    },
      +    "new_code": {
      +      "description": "Modified .kcad.ts source (present on success). Caller persists it.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "Whether the edit applied and re-evaluated cleanly.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  7. Changed26 schema fields changed
    • changedInput schema / properties / a / description
      Previous value: -"Connector ref: \"<partName>.<connectorName>\" (legacy) or \"@kc[<partName>/connector/<connectorName>]\"."New value: +"relation:'mate' — connector ref \"<partName>.<connectorName>\"."
    • addedInput schema / properties / actuator
      Added value: +{
      +  "description": "relation:'transmission' — optional actuator.",
      +  "type": "string"
      +}
    • removedInput schema / properties / assembly
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / assembly_binding
      Added value: +{
      +  "description": "JS identifier bound to assembly(...).",
      +  "type": "string"
      +}
    • changedInput schema / properties / b / description
      Previous value: -"Connector ref: \"<partName>.<connectorName>\" (legacy) or \"@kc[<partName>/connector/<connectorName>]\"."New value: +"relation:'mate' — connector ref \"<partName>.<connectorName>\"."
    • addedInput schema / properties / code
      Added value: +{
      +  "description": "The .kcad.ts source code.",
      +  "type": "string"
      +}
    • addedInput schema / properties / driven
      Added value: +{
      +  "description": "relation:'coupling' — driven mate name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / drivenMates
      Added value: +{
      +  "description": "relation:'transmission' — driven mate names.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "relation:'transmission' — optional input.",
      +  "type": "string"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "description": "relation:'transmission' — transmission kind.",
      +  "enum": [
      +    "direct-horn",
      +    "link-rod",
      +    "four-bar",
      +    "gear-pair",
      +    "belt",
      +    "tendon"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limitsDeg / description
      Previous value: -"Optional [minDeg, maxDeg] range for revolute/cylindrical/pin_slot mates."New value: +"relation:'mate' — optional [minDeg, maxDeg]."
    • addedInput schema / properties / limitsDeg / items
      Added value: +{
      +  "type": "number"
      +}
    • changedInput schema / properties / limitsMm / description
      Previous value: -"Optional [minMm, maxMm] range for prismatic mates."New value: +"relation:'mate' — optional [minMm, maxMm]."
    • addedInput schema / properties / limitsMm / items
      Added value: +{
      +  "type": "number"
      +}
    • changedInput schema / properties / name / description
      Previous value: -"Mate name (unique within the assembly)."New value: +"relation:'mate'|'transmission' — name unique within the assembly."
    • addedInput schema / properties / notes
      Added value: +{
      +  "description": "relation:'transmission' — optional notes.",
      +  "type": "string"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "relation:'coupling' — optional pose offset.",
      +  "type": "number"
      +}
    • addedInput schema / properties / output
      Added value: +{
      +  "description": "relation:'transmission' — optional output.",
      +  "type": "string"
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "relation:'transmission' — drive path.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / pose / description
      Previous value: -"Optional mate pose: number for scalar mates or [x, y, z] degrees for ball mates."New value: +"relation:'mate' — optional mate pose."
    • addedInput schema / properties / ratio
      Added value: +{
      +  "description": "relation:'coupling' — driven pose = source pose * ratio + offset.",
      +  "type": "number"
      +}
    • addedInput schema / properties / relation
      Added value: +{
      +  "description": "Which relationship to author (default 'mate').",
      +  "enum": [
      +    "mate",
      +    "coupling",
      +    "transmission"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "relation:'coupling' — source mate name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / sourceMate
      Added value: +{
      +  "description": "relation:'transmission' — source mate name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / type / description
      Added value: +"relation:'mate' — mate type."
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "a",
      -  "b",
      -  "type"
      -]New value: +[
      +  "code",
      +  "assembly_binding"
      +]
  8. Changed2 schema fields changed
    • changedInput schema / properties / a / description
      Previous value: -"Connector ref \"<partName>.<connectorName>\"."New value: +"Connector ref: \"<partName>.<connectorName>\" (legacy) or \"@kc[<partName>/connector/<connectorName>]\"."
    • changedInput schema / properties / b / description
      Previous value: -"Connector ref \"<partName>.<connectorName>\"."New value: +"Connector ref: \"<partName>.<connectorName>\" (legacy) or \"@kc[<partName>/connector/<connectorName>]\"."
  9. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.