Skip to main content
Glama

paint_mesh_regions

Assigns colors to named or ID-based mesh regions and exports a painted 3MF, opening an interactive 3D preview for visual verification.

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 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.
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. 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: \"\"."
  2. Addedv1.5.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations declare a non-readonly, non-destructive, non-open-world write, and the description adds a real behavioral trait annotations cannot express: a successful call opens an interactive 3D stage (or attaches a browser stage link for hosts without MCP Apps panels), and oversized meshes are auto-decimated. It does not state what happens to an existing file at the output path or the permissions/limits involved, so it stops short of full disclosure.

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 purpose is correctly front-loaded in the first clause, but roughly two-thirds of the text is the 3D-stage explanation, which is stated twice — once in the parenthetical and again in the 'INLINE 3D STAGE:' paragraph. That duplication displaces more useful content such as the segmentation prerequisite.

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?

For a 9-parameter write tool with no output schema, the description covers the write target and the viewer side effect but omits the workflow prerequisite (segment_mesh_regions / segmentation_params), what the returned artifact is called or where it lands, and how branch_name/design_id versioning behaves. Annotations plus 100% schema coverage carry much of the load, but the missing prerequisite is a real gap.

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 coverage is 100%, so every one of the 9 parameters, including the nested assignments object and its 16-colour cap, is already documented in structured fields. The description only echoes 'by name or id' for assignment keys, adding nothing beyond the schema; baseline 3 applies.

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 description opens with a specific verb and resource: 'Paint mesh regions by name or id and write a painted 3MF,' which tells an agent exactly what is produced. It does not differentiate from close siblings such as segment_mesh_regions (its implicit prerequisite) or paint_decoration_faces/auto_color_by_region, so sibling disambiguation is left to inference.

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 only implied: the agent can infer it should have segmented regions first because parameter descriptions reference 'the mesh that was segmented' and 'segmentation_params,' but the description itself never says to call segment_mesh_regions first or when to prefer preview_only. No explicit when-not or alternative-tool routing is given, despite several plausible alternatives in the sibling list.

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