Skip to main content
Glama

Add Connector

add_connector

Use this when you need to add a mate connector to a part. Durably insert <partBinding>.connector(name, { type, origin, axis?, normal? }) before the final top-level return. Use the part binding returned by add_part. Returns modified source plus diagnostics from re-evaluation. Side-effect-free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axisNoOptional [x, y, z] axis.
codeYesThe .kcad.ts source code.
nameYesConnector name unique within the part.
typeYes
normalNoOptional [x, y, z] normal.
originYesOrigin as [x, y, z] shorthand, or a structured ConnectorOrigin.
part_bindingYesJS identifier bound to an AssemblyPartRef, e.g. "basePart".

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. Changed2 schema fields changed
    • changedInput schema / properties / origin / description
      Previous value: -"Origin as [x, y, z] shorthand or structured ConnectorOrigin."New value: +"Origin as [x, y, z] shorthand, or a structured ConnectorOrigin."
    • addedInput schema / properties / origin / oneOf
      Added value: +[
      +  {
      +    "description": "[x, y, z] shorthand.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "maxItems": 3,
      +    "minItems": 3,
      +    "type": "array"
      +  },
      +  {
      +    "description": "Explicit numeric origin.",
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "vec3"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "maxItems": 3,
      +        "minItems": 3,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "Topology-derived origin.",
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "topology"
      +        ],
      +        "type": "string"
      +      },
      +      "query": {
      +        "properties": {
      +          "kind": {
      +            "enum": [
      +              "face-center",
      +              "face-normal",
      +              "vertex",
      +              "edge-axis"
      +            ],
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "name"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "query"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / origin / description
      Previous value: -"Origin as [x, y, z] shorthand, or a structured ConnectorOrigin."New value: +"Origin as [x, y, z] shorthand or structured ConnectorOrigin."
    • removedInput schema / properties / origin / oneOf
      Removed value: -[
      -  {
      -    "description": "[x, y, z] shorthand.",
      -    "items": {
      -      "type": "number"
      -    },
      -    "maxItems": 3,
      -    "minItems": 3,
      -    "type": "array"
      -  },
      -  {
      -    "description": "Explicit numeric origin.",
      -    "properties": {
      -      "kind": {
      -        "enum": [
      -          "vec3"
      -        ],
      -        "type": "string"
      -      },
      -      "value": {
      -        "items": {
      -          "type": "number"
      -        },
      -        "maxItems": 3,
      -        "minItems": 3,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "Topology-derived origin.",
      -    "properties": {
      -      "kind": {
      -        "enum": [
      -          "topology"
      -        ],
      -        "type": "string"
      -      },
      -      "query": {
      -        "properties": {
      -          "kind": {
      -            "enum": [
      -              "face-center",
      -              "face-normal",
      -              "vertex",
      -              "edge-axis"
      -            ],
      -            "type": "string"
      -          },
      -          "name": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "kind",
      -          "name"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "query"
      -    ],
      -    "type": "object"
      -  }
      -]
  4. Changed2 schema fields changed
    • changedInput schema / properties / origin / description
      Previous value: -"Origin as [x, y, z] shorthand or structured ConnectorOrigin."New value: +"Origin as [x, y, z] shorthand, or a structured ConnectorOrigin."
    • addedInput schema / properties / origin / oneOf
      Added value: +[
      +  {
      +    "description": "[x, y, z] shorthand.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "maxItems": 3,
      +    "minItems": 3,
      +    "type": "array"
      +  },
      +  {
      +    "description": "Explicit numeric origin.",
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "vec3"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "maxItems": 3,
      +        "minItems": 3,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "Topology-derived origin.",
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "topology"
      +        ],
      +        "type": "string"
      +      },
      +      "query": {
      +        "properties": {
      +          "kind": {
      +            "enum": [
      +              "face-center",
      +              "face-normal",
      +              "vertex",
      +              "edge-axis"
      +            ],
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "name"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "query"
      +    ],
      +    "type": "object"
      +  }
      +]
  5. 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"
      +}
  6. Changed11 schema fields changed
    • removedInput schema / properties / assembly
      Removed value: -{
      -  "description": "Assembly name; defaults to the only/first assembly on the active session.",
      -  "type": "string"
      -}
    • changedInput schema / properties / axis / description
      Previous value: -"Optional [x, y, z] axis (axis connectors)."New value: +"Optional [x, y, z] axis."
    • addedInput schema / properties / axis / items
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / code
      Added value: +{
      +  "description": "The .kcad.ts source code.",
      +  "type": "string"
      +}
    • changedInput schema / properties / name / description
      Previous value: -"Connector name (unique within the part)."New value: +"Connector name unique within the part."
    • changedInput schema / properties / normal / description
      Previous value: -"Optional [x, y, z] normal (frame / planar connectors)."New value: +"Optional [x, y, z] normal."
    • addedInput schema / properties / normal / items
      Added value: +{
      +  "type": "number"
      +}
    • changedInput schema / properties / origin / description
      Previous value: -"Origin as [x, y, z] (vec3 shorthand), a structured ConnectorOrigin, or a @kc[<part>/face/<name>] topology ref string (face-center default; #normal modifier yields face-normal). @kc[<part>/edge/<name>] maps to edge-axis; @kc[<part>/vertex/<name>] maps to vertex."New value: +"Origin as [x, y, z] shorthand or structured ConnectorOrigin."
    • removedInput schema / properties / part
      Removed value: -{
      -  "description": "Part name declared via arm.part(name, ...).",
      -  "type": "string"
      -}
    • addedInput schema / properties / part_binding
      Added value: +{
      +  "description": "JS identifier bound to an AssemblyPartRef, e.g. \"basePart\".",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "part",
      -  "name",
      -  "type",
      -  "origin"
      -]New value: +[
      +  "code",
      +  "part_binding",
      +  "name",
      +  "type",
      +  "origin"
      +]
  7. Changed1 schema field changed
    • changedInput schema / properties / origin / description
      Previous value: -"Origin as [x, y, z] (vec3 shorthand) or a structured ConnectorOrigin."New value: +"Origin as [x, y, z] (vec3 shorthand), a structured ConnectorOrigin, or a @kc[<part>/face/<name>] topology ref string (face-center default; #normal modifier yields face-normal). @kc[<part>/edge/<name>] maps to edge-axis; @kc[<part>/vertex/<name>] maps to vertex."
  8. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.