add_assembly_part
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
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | 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. | |
| role | No | Structural role of the part (default ``"structural"``). ``"base"`` marks the part the build starts from. Default: "structural". | |
| color | No | 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. | |
| part_id | Yes | Unique identifier for this part within the assembly. | |
| material | No | Filament material for the part (default ``"PLA"``). Default: "PLA". | |
| file_path | Yes | Path to the STL/OBJ mesh file for the part. | |
| position_x | No | X position offset in mm (default 0.0). Default: 0.0. | |
| position_y | No | Y position offset in mm (default 0.0). Default: 0.0. | |
| position_z | No | Z position offset in mm (default 0.0). Default: 0.0. | |
| assembly_json | Yes | JSON string of the current assembly state (as returned by create_assembly or a previous tool call). | |
| install_after | No | 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 | No | 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. |