Skip to main content
Glama

merge_design_branches

Destructive

Merge a source design branch into a target branch, record the result with conflict resolutions, and optionally inspect the merged model in Kiln's inline 3D stage.

Instructions

Record a merge of source into target with conflict resolution. Opens Kiln's interactive inline 3D stage on the result (orbit/zoom panel in MCP Apps hosts; hosted sessions add a browser stage link).

Free door, tiered answer — Free: Branch · merge · cherry-pick · undo, on the designs you keep · Pro: Branch · merge · cherry-pick · undo, on every design · Business: ✓ · Enterprise: ✓.

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": {
      "source_branch_id": "<source_branch_id>",
      "target_branch_id": "<target_branch_id>"
    },
    "name": "merge_design_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pr_idNoOptional explicit pull-request id to satisfy the gate with. Omitted → the open/approved PR on this exact source→target pair is used.
merged_byNoUser identifier for audit (server-verified against the authenticated session; derived from JWT).
resolutionsNoAnswers to the merge's open questions, ``{item_id: choice}``, where a choice is ``prefer_branch_a`` (the source), ``prefer_branch_b`` (the target), ``apply_neither``, a branch's name or ``original``; ``{"*": choice}`` answers every item not named. Omit it when ``detect_merge_conflicts`` reported ``ready``.
merge_strategyNoHow the merged version was composed, recorded on the merge: ``semantic`` (the default), ``source``, ``mesh_boolean``, ``source_with_conflicts``, ``user_curated`` or ``sketch``. Any other value, the empty string included, is refused. A sketch-built part records ``sketch`` whatever is passed. Default: "semantic".
source_branch_idYesBranch supplying the changes.
target_branch_idYesBranch receiving the merge.
merged_version_idNoThe composed result. Omit it for a sketch-built part and Kiln builds it; required otherwise.
ancestor_version_idNoCommon ancestor for the mesh path (without it, mesh conflict detection is skipped). A sketch merge always reads from the true split point.
expected_head_version_idNoThe source branch's newest version as the person last saw it (a request's proposed part, a branch list). If the branch has a newer one now, nothing is merged (``SOURCE_HEAD_MOVED``). Omitted: the branch as it is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / expected_head_version_id
      Added value: +{
      +  "description": "The source branch's newest version as the person last saw it (a request's proposed part, a branch list).  If the branch has a newer one now, nothing is merged (``SOURCE_HEAD_MOVED``).  Omitted: the branch as it is.",
      +  "title": "Expected Head Version Id",
      +  "type": "string"
      +}
  2. Changed8 schema fields changedv1.5.1
    • addedInput schema / properties / ancestor_version_id / description
      Added value: +"Common ancestor for the mesh path (without it, mesh conflict detection is skipped).  A sketch merge always reads from the true split point."
    • changedInput schema / properties / merge_strategy / description
      Previous value: -"Default: \"semantic\"."New value: +"How the merged version was composed, recorded on the merge: ``semantic`` (the default), ``source``, ``mesh_boolean``, ``source_with_conflicts``, ``user_curated`` or ``sketch``.  Any other value, the empty string included, is refused.  A sketch-built part records ``sketch`` whatever is passed. Default: \"semantic\"."
    • addedInput schema / properties / merged_by / description
      Added value: +"User identifier for audit (server-verified against the authenticated session; derived from JWT)."
    • addedInput schema / properties / merged_version_id / description
      Added value: +"The composed result.  Omit it for a sketch-built part and Kiln builds it; required otherwise."
    • addedInput schema / properties / pr_id / description
      Added value: +"Optional explicit pull-request id to satisfy the gate with.  Omitted → the open/approved PR on this exact source→target pair is used."
    • addedInput schema / properties / resolutions / description
      Added value: +"Answers to the merge's open questions, ``{item_id: choice}``, where a choice is ``prefer_branch_a`` (the source), ``prefer_branch_b`` (the target), ``apply_neither``, a branch's name or ``original``; ``{\"*\": choice}`` answers every item not named.  Omit it when ``detect_merge_conflicts`` reported ``ready``."
    • addedInput schema / properties / source_branch_id / description
      Added value: +"Branch supplying the changes."
    • addedInput schema / properties / target_branch_id / description
      Added value: +"Branch receiving the merge."
  3. Addedv1.5.0

TDQS

B3.4/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false. The description goes beyond them by describing a real side effect that no annotation captures: on success it opens an inline 3D viewer in MCP Apps hosts, attaches a browser stage link otherwise, and decimates oversized meshes. That is useful extra context. It does not say what destruction or state change the merge causes, though, and the 'Free door, tiered answer' line is plan marketing rather than behavioral detail.

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

Conciseness2/5

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

The opening sentence is well formed. After that, the text restates the 3D stage twice: once in paragraph one and again in the all-caps 'INLINE 3D STAGE' block, adding decimation and a browser link. The 'Free: Branch · merge · cherry-pick · undo…' tier list is plan marketing that costs space without helping an agent decide or invoke. Too much of the text does not earn its place.

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

Completeness3/5

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

This is a destructive operation with 9 params, a nested resolutions object, a PR gate, and head-movement protection, and it has no output schema. The description covers the stage side effect but omits the merge gate and the ordering relative to conflict detection, leaving the schema to carry the complicated parts. Adequate, not complete.

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% across all 9 params, including resolutions, merge_strategy, and expected_head_version_id, so the schema carries the semantics. The description adds nothing about parameters, not even the source/target direction, which is left to the properties. The baseline of 3 applies when the schema does the work.

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: 'Record a merge of source into target with conflict resolution'. That is enough for an agent to know this commits a merge, unlike the sibling detect_*_merge_conflicts tools. It stops short of naming those siblings explicitly, so differentiation is inferred rather than stated.

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 in the opening sentence rather than spelled out: the tool records the merge and captures conflict resolutions, which suggests it runs after conflict detection and before undo. The description never names an alternative or says when not to use it, and the critical pre-flight step (detect_merge_conflicts reporting 'ready') appears only in the schema. An agent has to assemble the workflow order itself.

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