Skip to main content
Glama

auto_color_by_region

Split a 3D model into printable color zones by geometric region, using Z-height bands, face normals, or random assignment, and export zone STLs plus a color-mapped 3MF.

Instructions

Split a 3D model into color zones by geometric region.

        Supports multiple assignment methods:
          - ``"z_height"``: horizontal bands by Z-height (default) —
            faces crossing a band edge are cut exactly at it and the
            cuts are capped, so the color boundary is a straight line
            on any tessellation and each zone of a closed model is
            itself a closed solid ready to slice
          - ``"normal"``: group by face normal direction
            (top / bottom / sides)
          - ``"random"``: random face assignment for artistic prints

        The 3MF takes whichever form actually prints: z_height bands
        become one closed solid per color; normal/random colorings
        follow the surface, so the mesh stays ONE watertight object
        with the colors painted per triangle — slicers that support
        color import (BambuStudio, OrcaSlicer) offer to map each
        color to a filament on open.

        Zero cloud dependencies — pure geometry.

        Says whether its colours are on the printer, as
        ``colour_availability`` (absent when Kiln cannot see what is
        loaded).  Relay its ``say`` as written and add nothing about
        filament: never suggest buying filament unless the person asks
        for one or says yes to the offer in ``say``.  On a yes, call
        ``find_closest_filaments`` with these colours and the print's
        material.

        :param input_path: Path to a binary STL file.
        :param num_colors: Number of color zones (default 4).
        :param method: Assignment method — ``"z_height"``,
            ``"normal"``, or ``"random"``.
        :param color_palette: List of hex colors.  Defaults to
            white/red/black/grey.
        :param material: Optional material the part will be printed in
            (e.g. ``"PETG"``).  A spool on record in a clearly
            different material is then not named as one to load.
        :param printer_id: Optional supported printer model id.  Names
            the bed the composed 3MF is placed on, so a model sitting
            off the plate is centred on the machine's real bed rather
            than an assumed 256mm one.
        :returns: Dict with zone STL paths, hex colors, face counts,
            AMS slot mapping, weight estimates, and optional 3MF path.

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>"
    },
    "name": "auto_color_by_region"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodNoAssignment method — ``"z_height"``, ``"normal"``, or ``"random"``. Default: "z_height".
materialNoOptional material the part will be printed in (e.g. ``"PETG"``). A spool on record in a clearly different material is then not named as one to load. Default: "".
input_pathYesPath to a binary STL file.
num_colorsNoNumber of color zones (default 4). Default: 4.
printer_idNoOptional supported printer model id. Names the bed the composed 3MF is placed on, so a model sitting off the plate is centred on the machine's real bed rather than an assumed 256mm one. Default: "".
color_paletteNoList of hex colors. Defaults to white/red/black/grey.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.5.1
    • addedInput schema / properties / color_palette / description
      Added value: +"List of hex colors.  Defaults to white/red/black/grey."
    • addedInput schema / properties / input_path / description
      Added value: +"Path to a binary STL file."
    • changedInput schema / properties / material / description
      Previous value: -"Default: \"\"."New value: +"Optional material the part will be printed in (e.g. ``\"PETG\"``).  A spool on record in a clearly different material is then not named as one to load. Default: \"\"."
    • changedInput schema / properties / method / description
      Previous value: -"Default: \"z_height\"."New value: +"Assignment method — ``\"z_height\"``, ``\"normal\"``, or ``\"random\"``. Default: \"z_height\"."
    • changedInput schema / properties / num_colors / description
      Previous value: -"Default: 4."New value: +"Number of color zones (default 4). Default: 4."
    • changedInput schema / properties / printer_id / description
      Previous value: -"Default: \"\"."New value: +"Optional supported printer model id.  Names the bed the composed 3MF is placed on, so a model sitting off the plate is centred on the machine's real bed rather than an assumed 256mm one. Default: \"\"."
  2. Changed7 schema fields changedv1.5.0
    • removedInput schema / properties / color_palette / default
      Removed value: -null
    • addedInput schema / properties / material
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Material",
      +  "type": "string"
      +}
    • removedInput schema / properties / method / default
      Removed value: -"z_height"
    • addedInput schema / properties / method / description
      Added value: +"Default: \"z_height\"."
    • removedInput schema / properties / num_colors / default
      Removed value: -4
    • addedInput schema / properties / num_colors / description
      Added value: +"Default: 4."
    • addedInput schema / properties / printer_id
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Printer Id",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false); the description goes well beyond that by explaining that z_height boundaries are cut and capped into closed solids, while normal/random keep one watertight mesh with per-triangle colors. It also discloses slicer compatibility, the zero-cloud-dependency constraint, the `colour_availability` field's absence semantics, and the inline 3D stage with automatic decimation.

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 bulleted method list and param block are well organized and front-loaded, but the description is bloated with a marketing line ('Zero cloud dependencies — pure geometry'), verbatim agent scripting about filament sales, and a long stage paragraph attached after the param block. Several sentences serve prompt-engineering rather than tool selection.

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 carries the return-value burden and does so by enumerating zone STL paths, hex colors, face counts, AMS slot mapping, weight estimates, and optional 3MF. It still omits where those files are written and what failure looks like, which matters for a non-readOnly tool that generates artifacts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description earns more by explaining consequences the schema does not: `material` suppresses naming a mismatched spool, `printer_id` re-centers the composed 3MF onto the real bed instead of an assumed 256mm plate, and each method string implies different geometry handling.

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 gives a specific verb and resource: 'Split a 3D model into color zones by geometric region', and the bullet list enumerates the three assignment methods so the agent knows exactly what the tool produces. It does not, however, differentiate itself from the sibling auto_color_by_height, which overlaps with the default z_height mode — a distinction the agent must infer.

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

Usage Guidelines4/5

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

Each method carries a usage cue ('z_height' default, 'normal' for top/bottom/sides, 'random' for artistic prints), and the FILAMENT section gives an explicit conditional workflow: relay `say`, and only on a yes call find_closest_filaments. What is missing is any statement of when to prefer this tool over auto_color_by_height or compose_multicolor_3mf.

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