compose_assembly_parts
Merges assembly part meshes into one STL and preserves joint, mechanism, and take-apart records so the 3D stage can play motion and show how pieces fit.
Instructions
Compose all assembly parts into a single output STL file.
Merges the individual part meshes according to their
positions and writes the combined model to ``output_path``.
Joints declared with a ``motion`` are kept beside the file, so
Kiln's 3D stage can play each one through its range and show
where its parts meet; the reply's ``joints`` says, per joint,
whether it binds and the sentence to tell the person. A
mechanism declared on the joints (``add_assembly_interface``'s
``mechanism``) is played through its cycle and kept beside the
file too, so the stage plays every part together; the reply's
``mechanism`` says whether it plays (``playable``), the sentence
to tell the person (``says``) and how many places parts meet
(``clashes``). Which
triangles are each part, and which parts come off the printer
as one piece, are kept too; the reply's ``assembly`` says how
many pieces there are, why parts were kept together and, under
``take_apart``, how many pieces have a way to come apart on
record (``stays_put`` is the one the others come off), or why
the pieces are not known (tell the person that sentence). For a
kit of more than one piece ``assembly.record`` is the record
itself; pass it as ``assembly_record`` when making an assembly
guide for the kit, so the guide's pictures come apart the same
way.
Args:
assembly_json: JSON string of the current assembly state.
output_path: File path where the composed STL will be written.
guide_steps: Optional steps of an assembly guide for these
parts, each ``{"part": <part id>, "direction": [x, y, z]
or null, "step": <number>}``: the direction the part
travels into place and the step that places it. Kept
beside the file, so the stage takes the design apart
the way the guide puts it together; the reply's
``assembly.guide_kept`` says whether they were kept.INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
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>",
"output_path": "<output_path>"
},
"name": "compose_assembly_parts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guide_steps | No | Optional steps of an assembly guide for these parts, each ``{"part": <part id>, "direction": [x, y, z] or null, "step": <number>}``: the direction the part travels into place and the step that places it. Kept beside the file, so the stage takes the design apart the way the guide puts it together; the reply's ``assembly.guide_kept`` says whether they were kept. | |
| output_path | Yes | File path where the composed STL will be written. | |
| assembly_json | Yes | JSON string of the current assembly state. |