Skip to main content
Glama

segment_mesh_regions

Split a mesh into distinct, paintable surface regions and visualize them for painting, labeling, or region-aware editing. Control region count and crease angle as needed.

Instructions

Split a mesh into paintable surface regions and show them.

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": "segment_mesh_regions"
  }
}

Input Schema

NameRequiredDescriptionDefault
crease_degNoDihedral angle above which an edge bounds a region. Defaults to Kiln's shared crease angle. Lower finds more, smaller regions; higher merges them.
input_pathYesSTL, 3MF, OBJ or any mesh trimesh reads.
max_regionsNoCoarsen until at most this many regions remain. Omit for the mesh's natural partition.
partition_hashNoAccepted and ignored, so the whole ``segmentation_params`` bundle can be splatted into either tool. This call always mints its own from what it derives. Default: "".
min_region_area_fracNoConfetti floor, as a fraction of total area. Both tools take it so the ``segmentation_params`` this call reports can be handed straight back to either of them and reproduce this exact partition.
include_triangle_regionsNoAlso return the region of every triangle (``triangle_regions``: one int per input triangle, packed little-endian int32 and base64-encoded, in the order Kiln numbers the file's triangles, which for an STL is the file's own; a pin's ``@`` triangle uses the same numbers). For apps that draw the mesh themselves and let the user click a region on it. Off by default — the map says nothing a person can read, and at the face ceiling it adds ~1.6 MB to the response. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.0
    • removedInput schema / properties / include_face_map
      Removed value: -{
      -  "description": "Also return the full face→region mapping (``face_map``: one int per input triangle, packed little-endian int32 and base64-encoded, in the input file's own triangle order).  For apps that draw the mesh themselves and let the user click a region on it.  Off by default — the map says nothing a person can read, and at the face ceiling it adds ~1.6 MB to the response. Default: false.",
      -  "title": "Include Face Map",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / include_triangle_regions
      Added value: +{
      +  "description": "Also return the region of every triangle (``triangle_regions``: one int per input triangle, packed little-endian int32 and base64-encoded, in the order Kiln numbers the file's triangles, which for an STL is the file's own; a pin's ``@`` triangle uses the same numbers). For apps that draw the mesh themselves and let the user click a region on it.  Off by default — the map says nothing a person can read, and at the face ceiling it adds ~1.6 MB to the response. Default: false.",
      +  "title": "Include Triangle Regions",
      +  "type": "boolean"
      +}
  2. Changed6 schema fields changedv1.5.1
    • addedInput schema / properties / crease_deg / description
      Added value: +"Dihedral angle above which an edge bounds a region.  Defaults to Kiln's shared crease angle.  Lower finds more, smaller regions; higher merges them."
    • changedInput schema / properties / include_face_map / description
      Previous value: -"Default: false."New value: +"Also return the full face→region mapping (``face_map``: one int per input triangle, packed little-endian int32 and base64-encoded, in the input file's own triangle order).  For apps that draw the mesh themselves and let the user click a region on it.  Off by default — the map says nothing a person can read, and at the face ceiling it adds ~1.6 MB to the response. Default: false."
    • addedInput schema / properties / input_path / description
      Added value: +"STL, 3MF, OBJ or any mesh trimesh reads."
    • addedInput schema / properties / max_regions / description
      Added value: +"Coarsen until at most this many regions remain.  Omit for the mesh's natural partition."
    • addedInput schema / properties / min_region_area_frac / description
      Added value: +"Confetti floor, as a fraction of total area.  Both tools take it so the ``segmentation_params`` this call reports can be handed straight back to either of them and reproduce this exact partition."
    • changedInput schema / properties / partition_hash / description
      Previous value: -"Default: \"\"."New value: +"Accepted and ignored, so the whole ``segmentation_params`` bundle can be splatted into either tool.  This call always mints its own from what it derives. Default: \"\"."
  3. Addedv1.5.0

TDQS

C2.8/5.0
Behavior2/5

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

Annotations supply only the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false). Beyond that, the description says nothing about the fact that the call mints its own partition hash, that the response can grow by ~1.6 MB at the face ceiling, or how the partition is reported back for reuse. The one sentence does not contradict the annotations, but it adds little behavioral context.

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?

A single front-loaded sentence with no wasted words, but it is undersized relative to a six-parameter tool with a nontrivial output and a hash handoff contract. Brevity here costs clarity rather than achieving it.

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

Completeness2/5

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

With six parameters, no output schema, and a payload that can carry a base64 triangle map, one sentence is not sufficient. The description omits the partition-hash reuse contract, the size implications of include_triangle_regions, and what "show them" actually produces.

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 each parameter (crease_deg, max_regions, min_region_area_frac, include_triangle_regions, ignored partition_hash) is already fully documented in the schema. The description adds nothing parameter-specific, so the baseline of 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?

States a specific verb (split) and resource (mesh into paintable surface regions), and "paintable" implicitly points toward the paint_mesh_regions sibling. However, "show them" is vague about what is actually returned, leaving the output form unclear.

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

Usage Guidelines2/5

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

No when-to-use guidance, no mention of paint_mesh_regions or other alternatives, and no stated prerequisites such as needing a segmented partition before painting. The agent must infer the workflow entirely from the name and 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