Skip to main content
Glama

paint_mesh_regions

Assign colors to named or ID-based mesh regions and export a painted 3MF, with an interactive 3D stage for inspecting the result.

Instructions

Paint mesh regions by name or id and write a painted 3MF. Opens Kiln's interactive inline 3D stage on the result (orbit/zoom panel in MCP Apps hosts; hosted sessions add a browser stage link).

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": {
      "input_path": "<input_path>",
      "assignments": "<assignments>"
    },
    "name": "paint_mesh_regions"
  }
}

Input Schema

NameRequiredDescriptionDefault
design_idNoLand the painted result in this design's version lineage, so a paint is a version you can branch, diff, release and roll back like any other change. Default: "".
crease_degNoCrease angle in degrees: pass the value ``segmentation_params`` returned, so the regions painted are the ones shown. Omitted, Kiln's shared crease angle is used.
input_pathYesThe mesh that was segmented.
printer_idNoCheck the requested colours against what this printer actually has loaded, and say so when it has fewer. Advice only — it never blocks a paint. It also names the bed the painted 3MF is placed on, so a model sitting off the plate is centred on the machine's real bed. Default: "".
assignmentsYes``{surface: "#rrggbb"}`` — surface by region id, by name, by a plain word, or ``face:<id or name>`` (above). Unassigned regions stay unpainted (the body colour). At most 16 distinct colours — a painted 3MF carries no more.
branch_nameNoBranch to put that version on. Default: "painted".
preview_onlyNoRender the candidate, write nothing. Default: false.
partition_hashNoFrom ``segmentation_params``. Checked against the partition this call derives, so approving one set of regions and painting another is a refusal rather than a wrong answer. Omitting it skips the check. Default: "".
min_region_area_fracNoSmallest region kept, as a fraction of the mesh's surface area: pass the value ``segmentation_params`` returned. Omitted, the default is used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • changedInput schema / properties / assignments / description
      Previous value: -"``{surface: \"#rrggbb\"}`` — surface by id, by name, or by a plain word (above).  Unassigned regions stay unpainted (the body colour).  At most 16 distinct colours — a painted 3MF carries no more."New value: +"``{surface: \"#rrggbb\"}`` — surface by region id, by name, by a plain word, or ``face:<id or name>`` (above).  Unassigned regions stay unpainted (the body colour).  At most 16 distinct colours — a painted 3MF carries no more."
  2. Changed9 schema fields changedv1.5.1
    • addedInput schema / properties / assignments / description
      Added value: +"``{surface: \"#rrggbb\"}`` — surface by id, by name, or by a plain word (above).  Unassigned regions stay unpainted (the body colour).  At most 16 distinct colours — a painted 3MF carries no more."
    • changedInput schema / properties / branch_name / description
      Previous value: -"Default: \"painted\"."New value: +"Branch to put that version on. Default: \"painted\"."
    • addedInput schema / properties / crease_deg / description
      Added value: +"Crease angle in degrees: pass the value ``segmentation_params`` returned, so the regions painted are the ones shown.  Omitted, Kiln's shared crease angle is used."
    • changedInput schema / properties / design_id / description
      Previous value: -"Default: \"\"."New value: +"Land the painted result in this design's version lineage, so a paint is a version you can branch, diff, release and roll back like any other change. Default: \"\"."
    • addedInput schema / properties / input_path / description
      Added value: +"The mesh that was segmented."
    • addedInput schema / properties / min_region_area_frac / description
      Added value: +"Smallest region kept, as a fraction of the mesh's surface area: pass the value ``segmentation_params`` returned.  Omitted, the default is used."
    • changedInput schema / properties / partition_hash / description
      Previous value: -"Default: \"\"."New value: +"From ``segmentation_params``.  Checked against the partition this call derives, so approving one set of regions and painting another is a refusal rather than a wrong answer.  Omitting it skips the check. Default: \"\"."
    • changedInput schema / properties / preview_only / description
      Previous value: -"Default: false."New value: +"Render the candidate, write nothing. Default: false."
    • changedInput schema / properties / printer_id / description
      Previous value: -"Default: \"\"."New value: +"Check the requested colours against what this printer actually has loaded, and say so when it has fewer.  Advice only — it never blocks a paint.  It also names the bed the painted 3MF is placed on, so a model sitting off the plate is centred on the machine's real bed. Default: \"\"."
  3. Addedv1.5.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), and the description adds genuine behavioral context beyond them: it opens an interactive viewer, automatically decimates oversized meshes, and the PNG preview is only a floor. It stops short of saying where the painted 3MF lands on disk or what happens to an existing file, which matters for a write operation.

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 first paragraph and the 'INLINE 3D STAGE' paragraph restate the same fact almost verbatim — that an interactive orbit/zoom stage opens and hosted sessions get a browser link. That duplication plus promotional phrasing ('the floor, not the whole experience') consumes roughly half the description without adding information.

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?

Nine parameters, 100% schema coverage, and a genuine mutation of unknown scale: 16-colour cap and unpainted-region default come from the schema. The description omits the output side entirely — with no output schema, an agent still cannot tell where the painted 3MF is written or how the file is named.

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%, including rich per-parameter docs for design_id, printer_id, assignments, partition_hash, and preview_only, so the schema does the heavy lifting and a 3 is the baseline. The description itself only echoes 'by name or id' and the decimation behaviour, adding little parameter-level meaning beyond the schema.

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, resource, and output artifact: 'Paint mesh regions by name or id and write a painted 3MF.' That is clearly distinguishable from a segmentation tool or a decoration-painting tool by implication. It never names a sibling to contrast with, 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?

There is workflow guidance embedded in the schema ('pass the value segmentation_params returned', 'so the regions painted are the ones shown'), which implies this tool follows segmentation. However, the description itself gives no when-to-use framing, no guidance on when to prefer preview_only over a real write, and no mention of when another tool would be the right choice.

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