Skip to main content
Glama

add_assembly_interface

Read-only

Add a mating interface between two assembly parts to define joint type, clearance, and optional motion or mechanism data for validation and clearance checking.

Instructions

Add a mating interface between two parts in an assembly.

        Defines how two parts connect (joint type and clearance),
        which is used during validation and clearance checking.  For
        screw/anchor-based joints, ``fastener`` may provide an
        explicit hardware spec so downstream manuals and BOM tools do
        not have to guess from clearance alone.  For a joint whose
        parts move after printing (a hinge, slider, ball or gear),
        ``motion`` records the axis and the range once, on the
        interface, so the joint's clearance is judged through its
        whole motion rather than at the pose as modelled.  When several
        joints move together (a crank turning cams, gears, a lever
        riding on a cam), ``mechanism`` says this joint's place in that:
        the driver, coupled to another joint, or the hinge of a part
        that rides on another.  ``compose_assembly_parts`` then plays
        the whole mechanism for Kiln's 3D stage.  The reply's
        ``interface`` is this joint's number, the number a later
        coupling names it by.

        Args:
            assembly_json: JSON string of the current assembly state.
            part_a_id: ID of the first part in the interface.
            part_b_id: ID of the second part in the interface.
            joint_type: Type of joint (default ``"clearance_fit"``):
                ``"snap_fit"``, ``"press_fit"``, ``"interference_fit"``,
                ``"clearance_fit"``, ``"loose"``, ``"tongue_groove"``,
                ``"threaded"``, ``"glued"``, ``"magnetic"`` or
                ``"heat_set_insert"``.  A screw into a brass insert is
                two interfaces on the same two parts: ``"threaded"``
                with the screw as ``fastener``, and
                ``"heat_set_insert"`` with ``part_b_id`` the part the
                insert is melted into.
            clearance_mm: Clearance gap in mm (default 0.2); for a round
                joint, the difference between the two diameters.  For
                ``"interference_fit"`` pass a NEGATIVE value (the
                part is intentionally larger than its socket);
                interference geometry is the entire point.
            magnet_polarity_aligned: Only meaningful when
                ``joint_type == "magnetic"``.  ``True`` declares
                the designer has confirmed which poles face each
                other in each magnet pocket; ``None`` means
                unknown.  Downstream tooling refuses to ship a
                hand-wavy "make sure they pull together"
                instruction when polarity is unknown.
            fastener: Optional FastenerSpec as a dict or JSON object
                string.  Supported keys include ``size``, ``family``,
                ``length_mm``, ``length_range_mm``, ``head_type``,
                ``drive_type``, ``surface_type``,
                ``quantity_per_interface``, ``notes``, ``driver``
                (the driver the screw takes, as the kit's supplier
                states it, e.g. ``"2 mm hex key"``) and ``product``
                (the exact bought part: maker and part number).  On a
                ``"heat_set_insert"`` or ``"magnetic"`` interface the
                fastener names that hardware (``family``
                ``"heat_set_insert"`` or ``"magnet"``) and may give
                ``hole_diameter_mm`` and ``hole_depth_mm`` (the pocket
                as drawn) and, for an insert, ``install_temp_c`` (the
                iron temperature, one value or ``[low, high]``); an
                assembly guide prints what is given.
            motion: Optional joint motion as a dict or JSON object
                string, for a joint that moves after printing (part B
                relative to part A, in the assembly's frame): ``kind``
                (``"hinge"``, ``"slider"``, ``"ball"`` or ``"gear"``),
                ``axis_point_mm`` (a point on the axis; a ball joint's
                centre), ``axis_direction`` (the axis as x, y, z),
                ``range_min`` and ``range_max`` (degrees for a hinge,
                ball or gear with 0 the pose as modelled, millimetres
                for a slider), and optionally ``mating`` (the gap class
                the clearance is judged in; follows the kind when
                omitted), and ``continuous`` (``true`` for a hinge or
                gear that turns without end, such as a crankshaft; its
                range is 0 to 360).  Omit it for a joint that does not move.
            mechanism: Optional place of this joint in a mechanism, as a
                dict or JSON object string; the joint must declare a
                ``motion``.  One of:
                ``{"driver": true}`` -- this is the joint that is turned
                or pushed; every other moving joint follows it.  Declare
                it before the others.  It runs through the joint's own
                range, or ``"range": [low, high]`` to play a narrower one;
                a ``continuous`` joint turns round and round.
                ``{"coupled_to": <joint number>, "kind": "gear", "ratio":
                <number>}`` -- this joint turns ``ratio`` times the named
                joint (negative when it turns the other way, as an
                external gear pair does); ``"kind": "rack"`` with
                ``pitch_radius_mm`` or ``"kind": "screw"`` with
                ``lead_mm`` joins a joint that turns and one that slides.
                ``{"rests_on": "<part id>"}`` -- part B is held only by
                this hinge and rides on the named part under its own
                weight (a cam's lever, a pawl); optionally
                ``bearing_radius_mm``, the radius of the hinge's pin.
                Omit it for a joint that is not part of a mechanism.
            prints_separately: ``True`` when the two parts are printed
                apart and put together by hand.  Their gap is then
                checked as a fit to assemble (and, with ``motion``, to
                keep moving) and never as two surfaces that could fuse
                on the plate.  Leave ``False`` for a print-in-place joint.
        

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": {
      "assembly_json": "<assembly_json>",
      "part_a_id": "<part_a_id>",
      "part_b_id": "<part_b_id>"
    },
    "name": "add_assembly_interface"
  }
}

Input Schema

NameRequiredDescriptionDefault
motionNoOptional joint motion as a dict or JSON object string, for a joint that moves after printing (part B relative to part A, in the assembly's frame): ``kind`` (``"hinge"``, ``"slider"``, ``"ball"`` or ``"gear"``), ``axis_point_mm`` (a point on the axis; a ball joint's centre), ``axis_direction`` (the axis as x, y, z), ``range_min`` and ``range_max`` (degrees for a hinge, ball or gear with 0 the pose as modelled, millimetres for a slider), and optionally ``mating`` (the gap class the clearance is judged in; follows the kind when omitted), and ``continuous`` (``true`` for a hinge or gear that turns without end, such as a crankshaft; its range is 0 to 360). Omit it for a joint that does not move.
fastenerNoOptional FastenerSpec as a dict or JSON object string. Supported keys include ``size``, ``family``, ``length_mm``, ``length_range_mm``, ``head_type``, ``drive_type``, ``surface_type``, ``quantity_per_interface``, ``notes``, ``driver`` (the driver the screw takes, as the kit's supplier states it, e.g. ``"2 mm hex key"``) and ``product`` (the exact bought part: maker and part number). On a ``"heat_set_insert"`` or ``"magnetic"`` interface the fastener names that hardware (``family`` ``"heat_set_insert"`` or ``"magnet"``) and may give ``hole_diameter_mm`` and ``hole_depth_mm`` (the pocket as drawn) and, for an insert, ``install_temp_c`` (the iron temperature, one value or ``[low, high]``); an assembly guide prints what is given.
mechanismNoOptional place of this joint in a mechanism, as a dict or JSON object string; the joint must declare a ``motion``. One of: ``{"driver": true}`` -- this is the joint that is turned or pushed; every other moving joint follows it. Declare it before the others. It runs through the joint's own range, or ``"range": [low, high]`` to play a narrower one; a ``continuous`` joint turns round and round. ``{"coupled_to": <joint number>, "kind": "gear", "ratio": <number>}`` -- this joint turns ``ratio`` times the named joint (negative when it turns the other way, as an external gear pair does); ``"kind": "rack"`` with ``pitch_radius_mm`` or ``"kind": "screw"`` with ``lead_mm`` joins a joint that turns and one that slides. ``{"rests_on": "<part id>"}`` -- part B is held only by this hinge and rides on the named part under its own weight (a cam's lever, a pawl); optionally ``bearing_radius_mm``, the radius of the hinge's pin. Omit it for a joint that is not part of a mechanism.
part_a_idYesID of the first part in the interface.
part_b_idYesID of the second part in the interface.
joint_typeNoType of joint (default ``"clearance_fit"``): ``"snap_fit"``, ``"press_fit"``, ``"interference_fit"``, ``"clearance_fit"``, ``"loose"``, ``"tongue_groove"``, ``"threaded"``, ``"glued"``, ``"magnetic"`` or ``"heat_set_insert"``. A screw into a brass insert is two interfaces on the same two parts: ``"threaded"`` with the screw as ``fastener``, and ``"heat_set_insert"`` with ``part_b_id`` the part the insert is melted into. Default: "clearance_fit".
clearance_mmNoClearance gap in mm (default 0.2); for a round joint, the difference between the two diameters. For ``"interference_fit"`` pass a NEGATIVE value (the part is intentionally larger than its socket); interference geometry is the entire point. Default: 0.2.
assembly_jsonYesJSON string of the current assembly state.
prints_separatelyNo``True`` when the two parts are printed apart and put together by hand. Their gap is then checked as a fit to assemble (and, with ``motion``, to keep moving) and never as two surfaces that could fuse on the plate. Leave ``False`` for a print-in-place joint. Default: false.
magnet_polarity_alignedNoOnly meaningful when ``joint_type == "magnetic"``. ``True`` declares the designer has confirmed which poles face each other in each magnet pocket; ``None`` means unknown. Downstream tooling refuses to ship a hand-wavy "make sure they pull together" instruction when polarity is unknown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.6.0
    • changedInput schema / properties / clearance_mm / description
      Previous value: -"Clearance gap in mm (default 0.2).  For ``\"interference_fit\"`` pass a NEGATIVE value (the part is intentionally larger than its socket); interference geometry is the entire point. Default: 0.2."New value: +"Clearance gap in mm (default 0.2); for a round joint, the difference between the two diameters.  For ``\"interference_fit\"`` pass a NEGATIVE value (the part is intentionally larger than its socket); interference geometry is the entire point. Default: 0.2."
    • changedInput schema / properties / fastener / description
      Previous value: -"Optional FastenerSpec as a dict or JSON object string.  Supported keys include ``size``, ``family``, ``length_mm``, ``length_range_mm``, ``head_type``, ``drive_type``, ``surface_type``, ``quantity_per_interface``, and ``notes``."New value: +"Optional FastenerSpec as a dict or JSON object string.  Supported keys include ``size``, ``family``, ``length_mm``, ``length_range_mm``, ``head_type``, ``drive_type``, ``surface_type``, ``quantity_per_interface``, ``notes``, ``driver`` (the driver the screw takes, as the kit's supplier states it, e.g. ``\"2 mm hex key\"``) and ``product`` (the exact bought part: maker and part number).  On a ``\"heat_set_insert\"`` or ``\"magnetic\"`` interface the fastener names that hardware (``family`` ``\"heat_set_insert\"`` or ``\"magnet\"``) and may give ``hole_diameter_mm`` and ``hole_depth_mm`` (the pocket as drawn) and, for an insert, ``install_temp_c`` (the iron temperature, one value or ``[low, high]``); an assembly guide prints what is given."
    • changedInput schema / properties / joint_type / description
      Previous value: -"Type of joint (default ``\"clearance_fit\"``). Default: \"clearance_fit\"."New value: +"Type of joint (default ``\"clearance_fit\"``): ``\"snap_fit\"``, ``\"press_fit\"``, ``\"interference_fit\"``, ``\"clearance_fit\"``, ``\"loose\"``, ``\"tongue_groove\"``, ``\"threaded\"``, ``\"glued\"``, ``\"magnetic\"`` or ``\"heat_set_insert\"``.  A screw into a brass insert is two interfaces on the same two parts: ``\"threaded\"`` with the screw as ``fastener``, and ``\"heat_set_insert\"`` with ``part_b_id`` the part the insert is melted into. Default: \"clearance_fit\"."
    • addedInput schema / properties / mechanism
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Optional place of this joint in a mechanism, as a dict or JSON object string; the joint must declare a ``motion``.  One of: ``{\"driver\": true}`` -- this is the joint that is turned or pushed; every other moving joint follows it.  Declare it before the others.  It runs through the joint's own range, or ``\"range\": [low, high]`` to play a narrower one; a ``continuous`` joint turns round and round. ``{\"coupled_to\": <joint number>, \"kind\": \"gear\", \"ratio\": <number>}`` -- this joint turns ``ratio`` times the named joint (negative when it turns the other way, as an external gear pair does); ``\"kind\": \"rack\"`` with ``pitch_radius_mm`` or ``\"kind\": \"screw\"`` with ``lead_mm`` joins a joint that turns and one that slides. ``{\"rests_on\": \"<part id>\"}`` -- part B is held only by this hinge and rides on the named part under its own weight (a cam's lever, a pawl); optionally ``bearing_radius_mm``, the radius of the hinge's pin. Omit it for a joint that is not part of a mechanism.",
      +  "title": "Mechanism"
      +}
    • addedInput schema / properties / motion
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Optional joint motion as a dict or JSON object string, for a joint that moves after printing (part B relative to part A, in the assembly's frame): ``kind`` (``\"hinge\"``, ``\"slider\"``, ``\"ball\"`` or ``\"gear\"``), ``axis_point_mm`` (a point on the axis; a ball joint's centre), ``axis_direction`` (the axis as x, y, z), ``range_min`` and ``range_max`` (degrees for a hinge, ball or gear with 0 the pose as modelled, millimetres for a slider), and optionally ``mating`` (the gap class the clearance is judged in; follows the kind when omitted), and ``continuous`` (``true`` for a hinge or gear that turns without end, such as a crankshaft; its range is 0 to 360).  Omit it for a joint that does not move.",
      +  "title": "Motion"
      +}
    • addedInput schema / properties / prints_separately
      Added value: +{
      +  "description": "``True`` when the two parts are printed apart and put together by hand.  Their gap is then checked as a fit to assemble (and, with ``motion``, to keep moving) and never as two surfaces that could fuse on the plate.  Leave ``False`` for a print-in-place joint. Default: false.",
      +  "title": "Prints Separately",
      +  "type": "boolean"
      +}
  2. Changed7 schema fields changedv1.5.1
    • addedInput schema / properties / assembly_json / description
      Added value: +"JSON string of the current assembly state."
    • changedInput schema / properties / clearance_mm / description
      Previous value: -"Default: 0.2."New value: +"Clearance gap in mm (default 0.2).  For ``\"interference_fit\"`` pass a NEGATIVE value (the part is intentionally larger than its socket); interference geometry is the entire point. Default: 0.2."
    • addedInput schema / properties / fastener / description
      Added value: +"Optional FastenerSpec as a dict or JSON object string.  Supported keys include ``size``, ``family``, ``length_mm``, ``length_range_mm``, ``head_type``, ``drive_type``, ``surface_type``, ``quantity_per_interface``, and ``notes``."
    • changedInput schema / properties / joint_type / description
      Previous value: -"Default: \"clearance_fit\"."New value: +"Type of joint (default ``\"clearance_fit\"``). Default: \"clearance_fit\"."
    • addedInput schema / properties / magnet_polarity_aligned / description
      Added value: +"Only meaningful when ``joint_type == \"magnetic\"``.  ``True`` declares the designer has confirmed which poles face each other in each magnet pocket; ``None`` means unknown.  Downstream tooling refuses to ship a hand-wavy \"make sure they pull together\" instruction when polarity is unknown."
    • addedInput schema / properties / part_a_id / description
      Added value: +"ID of the first part in the interface."
    • addedInput schema / properties / part_b_id / description
      Added value: +"ID of the second part in the interface."
  3. Changed8 schema fields changedv1.5.0
    • addedInput schema / properties / assembly_json / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / assembly_json / type
      Removed value: -"string"
    • removedInput schema / properties / clearance_mm / default
      Removed value: -0.2
    • addedInput schema / properties / clearance_mm / description
      Added value: +"Default: 0.2."
    • removedInput schema / properties / fastener / default
      Removed value: -null
    • removedInput schema / properties / joint_type / default
      Removed value: -"clearance_fit"
    • addedInput schema / properties / joint_type / description
      Added value: +"Default: \"clearance_fit\"."
    • removedInput schema / properties / magnet_polarity_aligned / default
      Removed value: -null
  4. First observedv0.1.0

TDQS

B3.4/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, but the description says 'Add a mating interface' and describes the reply's interface as 'this joint's number,' which clearly indicates creating or mutating assembly state. This is a direct contradiction, so the score is 1. Otherwise the description adds rich behavioral context about downstream validation and hardware specification.

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

Conciseness3/5

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

The purpose is front-loaded in a clear opening sentence, and the Args section is organized, but the definition is very long and largely duplicates the schema text. Some length is justified by ten complex parameters, but several narrative asides could be trimmed without losing essential meaning.

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

Completeness4/5

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

For a ten-parameter assembly-mating tool with no output schema, the description thoroughly covers joint types, clearance semantics, motion and mechanism structures, and downstream effects. It is nearly complete, though the annotation contradiction prevents it from being fully trustworthy as a standalone specification.

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%, and the schema property descriptions repeat the same detailed text as the description's Args section. Therefore the description adds no meaning beyond what the structured input schema already provides. The baseline score of 3 applies when the schema carries the parameter documentation.

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 first sentence states a specific verb and resource: 'Add a mating interface between two parts in an assembly.' It also clarifies that the interface is used during validation and clearance checking, and it distinguishes itself from compose_assembly_parts by naming that tool as the consumer of mechanism data.

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 gives clear conditional guidance for optional parameters: use fastener for screw/anchor hardware, motion for joints that move after printing, mechanism for multi-joint behavior, and prints_separately for hand-assembled parts. It does not explicitly name an alternative tool for adding a part rather than an interface, but the intended usage context is well established.

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

Deploy Server

Other Tools