Skip to main content
Glama

add_assembly_part

Read-only

Append a part to an existing assembly by parsing its JSON state and returning the updated assembly with the new part included.

Instructions

Add a part to an existing assembly.

        Parses the assembly from its JSON representation, appends
        the new part, and returns the updated assembly state.

        Args:
            assembly_json: JSON string of the current assembly state
                (as returned by create_assembly or a previous tool call).
            part_id: Unique identifier for this part within the assembly.
            file_path: Path to the STL/OBJ mesh file for the part.
            position_x: X position offset in mm (default 0.0).
            position_y: Y position offset in mm (default 0.0).
            position_z: Z position offset in mm (default 0.0).
            material: Filament material for the part (default ``"PLA"``).
            role: Structural role of the part (default ``"structural"``).
                ``"base"`` marks the part the build starts from.
            color: Optional colour the part is shown in on Kiln's 3D
                stage, written ``#rrggbb`` (for example ``"#f26b21"``).
                Omit it to leave the choice to the stage.
            install_after: Build order, when it matters: the ids of the
                parts that have to be in place before this one goes on
                (a lid after what it covers, a frame after the shafts
                it traps).  They may be added later.  Every assembly
                tool keeps it and an assembly guide follows it;
                ``validate_assembly`` says when it names a part that
                does not exist or goes in a ring.
            insertion_axis: The direction this part travels to its seat,
                as ``[x, y, z]`` in the assembly's frame (a pin pushed
                in along +Y is ``[0, 1, 0]``).  Give it for a part that
                sits inside another (a rod in a bore, a part on a
                shaft), where its position alone cannot say which way
                it went in.
            name: What a person calls the part, in your own words
                (``"hare lever"``, ``"back camshaft spacer"``).  An
                assembly guide prints it as written; omitted, the part
                is worded from its id.
        

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_id": "<part_id>",
      "file_path": "<file_path>"
    },
    "name": "add_assembly_part"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoWhat a person calls the part, in your own words (``"hare lever"``, ``"back camshaft spacer"``). An assembly guide prints it as written; omitted, the part is worded from its id.
roleNoStructural role of the part (default ``"structural"``). ``"base"`` marks the part the build starts from. Default: "structural".
colorNoOptional colour the part is shown in on Kiln's 3D stage, written ``#rrggbb`` (for example ``"#f26b21"``). Omit it to leave the choice to the stage.
part_idYesUnique identifier for this part within the assembly.
materialNoFilament material for the part (default ``"PLA"``). Default: "PLA".
file_pathYesPath to the STL/OBJ mesh file for the part.
position_xNoX position offset in mm (default 0.0). Default: 0.0.
position_yNoY position offset in mm (default 0.0). Default: 0.0.
position_zNoZ position offset in mm (default 0.0). Default: 0.0.
assembly_jsonYesJSON string of the current assembly state (as returned by create_assembly or a previous tool call).
install_afterNoBuild order, when it matters: the ids of the parts that have to be in place before this one goes on (a lid after what it covers, a frame after the shafts it traps). They may be added later. Every assembly tool keeps it and an assembly guide follows it; ``validate_assembly`` says when it names a part that does not exist or goes in a ring.
insertion_axisNoThe direction this part travels to its seat, as ``[x, y, z]`` in the assembly's frame (a pin pushed in along +Y is ``[0, 1, 0]``). Give it for a part that sits inside another (a rod in a bore, a part on a shaft), where its position alone cannot say which way it went in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.6.0
    • addedInput schema / properties / color
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Optional colour the part is shown in on Kiln's 3D stage, written ``#rrggbb`` (for example ``\"#f26b21\"``). Omit it to leave the choice to the stage.",
      +  "title": "Color"
      +}
    • addedInput schema / properties / insertion_axis
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The direction this part travels to its seat, as ``[x, y, z]`` in the assembly's frame (a pin pushed in along +Y is ``[0, 1, 0]``).  Give it for a part that sits inside another (a rod in a bore, a part on a shaft), where its position alone cannot say which way it went in.",
      +  "title": "Insertion Axis"
      +}
    • addedInput schema / properties / install_after
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Build order, when it matters: the ids of the parts that have to be in place before this one goes on (a lid after what it covers, a frame after the shafts it traps).  They may be added later.  Every assembly tool keeps it and an assembly guide follows it; ``validate_assembly`` says when it names a part that does not exist or goes in a ring.",
      +  "title": "Install After"
      +}
    • addedInput schema / properties / name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What a person calls the part, in your own words (``\"hare lever\"``, ``\"back camshaft spacer\"``).  An assembly guide prints it as written; omitted, the part is worded from its id.",
      +  "title": "Name"
      +}
    • changedInput schema / properties / role / description
      Previous value: -"Structural role of the part (default ``\"structural\"``). Default: \"structural\"."New value: +"Structural role of the part (default ``\"structural\"``). ``\"base\"`` marks the part the build starts from. Default: \"structural\"."
  2. Changed8 schema fields changedv1.5.1
    • addedInput schema / properties / assembly_json / description
      Added value: +"JSON string of the current assembly state (as returned by create_assembly or a previous tool call)."
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the STL/OBJ mesh file for the part."
    • changedInput schema / properties / material / description
      Previous value: -"Default: \"PLA\"."New value: +"Filament material for the part (default ``\"PLA\"``). Default: \"PLA\"."
    • addedInput schema / properties / part_id / description
      Added value: +"Unique identifier for this part within the assembly."
    • changedInput schema / properties / position_x / description
      Previous value: -"Default: 0.0."New value: +"X position offset in mm (default 0.0). Default: 0.0."
    • changedInput schema / properties / position_y / description
      Previous value: -"Default: 0.0."New value: +"Y position offset in mm (default 0.0). Default: 0.0."
    • changedInput schema / properties / position_z / description
      Previous value: -"Default: 0.0."New value: +"Z position offset in mm (default 0.0). Default: 0.0."
    • changedInput schema / properties / role / description
      Previous value: -"Default: \"structural\"."New value: +"Structural role of the part (default ``\"structural\"``). Default: \"structural\"."
  3. Changed12 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 / material / default
      Removed value: -"PLA"
    • addedInput schema / properties / material / description
      Added value: +"Default: \"PLA\"."
    • removedInput schema / properties / position_x / default
      Removed value: -0
    • addedInput schema / properties / position_x / description
      Added value: +"Default: 0.0."
    • removedInput schema / properties / position_y / default
      Removed value: -0
    • addedInput schema / properties / position_y / description
      Added value: +"Default: 0.0."
    • removedInput schema / properties / position_z / default
      Removed value: -0
    • addedInput schema / properties / position_z / description
      Added value: +"Default: 0.0."
    • removedInput schema / properties / role / default
      Removed value: -"structural"
    • addedInput schema / properties / role / description
      Added value: +"Default: \"structural\"."
  4. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false. The description adds useful behavior beyond that: it parses the assembly JSON, appends the part in memory, and returns the updated assembly state, which clarifies that no persistent external mutation is implied despite the 'add' wording.

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 description is front-loaded with a clear purpose and behavior statement, but the long Args section duplicates the input schema almost verbatim. That redundancy reduces conciseness even though the structure is organized and readable.

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 12-parameter tool with no output schema, the description covers the core operation, return behavior, and every parameter. It does not discuss error handling for malformed assembly_json, missing mesh files, or invalid part ids, but it is otherwise sufficient for correct invocation.

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 12 parameters. The description repeats the same parameter explanations in its Args section without adding new meaning beyond examples and default values already present in the schema.

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 part to an existing assembly. The following sentences clarify that it parses assembly JSON, appends the part, and returns the updated state, which distinguishes it from create_assembly and validate_assembly.

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 definition gives context for use by saying assembly_json is the current state as returned by create_assembly or a previous tool call, implying this is for extending an existing assembly. However, it does not explicitly state exclusions or name alternative tools for related operations such as create_assembly or validate_assembly.

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