Skip to main content
Glama

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

NameRequiredDescriptionDefault
guide_stepsNoOptional 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_pathYesFile path where the composed STL will be written.
assembly_jsonYesJSON string of the current assembly state.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / guide_steps
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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.",
      +  "title": "Guide Steps"
      +}
  2. Changed2 schema fields changedv1.5.1
    • addedInput schema / properties / assembly_json / description
      Added value: +"JSON string of the current assembly state."
    • addedInput schema / properties / output_path / description
      Added value: +"File path where the composed STL will be written."
  3. Changed2 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"
  4. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), the description discloses real side effects: it writes the merged STL to output_path and keeps joints, mechanism data, triangle-to-part maps, and guide steps 'beside the file.' It also documents the shape of the reply (joints, mechanism.playable/says/clashes, assembly.take_apart). It does not say what happens if output_path already exists or what errors look like.

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 core action is front-loaded in the first two sentences, but the middle is a long run-on chain of backticked reply-field names ('Which triangles are each part, and which parts come off the printer as one piece...') that is hard to parse. The Args block largely repeats the schema, spending words that add no new information.

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?

With no output schema, the description usefully enumerates the reply fields (joints, mechanism, assembly, take_apart, guide_kept) and the side artifacts it preserves, which is what an agent needs to interpret the result. Only mutation-edge behavior (overwrite semantics, failure modes) is left unaddressed.

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 schema already documents all three parameters, and the parameter prose in the description is essentially verbatim from the schema. The only added meaning is the downstream pointer that assembly.record should be reused as assembly_record. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Compose all assembly parts into a single output STL file') and the second sentence explains the merge-and-write behavior. It does not distinguish itself from nearby siblings such as compose_models or compose_multicolor_3mf, so an agent must infer which composer applies to its case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the tool composes an assembly into one STL, and the description notes that a kit's assembly.record should later be passed as assembly_record to a guide tool. There is no explicit when-to-use/when-not or prerequisite statement (e.g., that an assembly must already exist), and no routing away from sibling composers.

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