Skip to main content
Glama

select_mesh_triangles

Destructive

Preview which triangles a region resolves to before painting materials, returning counts and IDs without modifying the mesh to catch empty selections early.

Instructions

Resolve a region into a triangle selection and REPORT it, without modifying anything. Read-only companion of set_mesh_material_id_in_region: same region parameters, same resolver, so a region previewed here paints exactly those triangles there. Use it to avoid the failure mode where a mis-specified box selects 0 triangles and the paint call still returns success. Coordinates are LOCAL to the dynamic mesh, not world.

Returns: { actor_name, region, triangles_selected: int, mesh_triangle_count: int, is_empty: bool, triangle_ids: [int], triangle_ids_truncated: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
centerNoLocal [x,y,z] centre. Used by box/sphere, and as the plane origin.
extentNoLocal [x,y,z] HALF-size in cm. Required by region='box'.
invertNoInvert the spatial selection (default false).
normalNo[x,y,z] direction. Plane normal for region='plane', facing direction for 'normal_angle'. Default [0,0,1].
radiusNoRadius in cm. Required by region='sphere'.
regionNo'all' (default) | 'box' | 'sphere' | 'plane' | 'normal_angle' | 'material_id' | 'polygroup' | 'connected_component' (one physical PIECE, by the island index that get_mesh_components_detail reports).
actor_nameYesLabel or name of the target DynamicMeshActor.
polygroup_idNoPolygroup to select when region='polygroup'.
max_angle_degNoMax angle from normal in degrees for region='normal_angle' (default 15).
component_indexNoIsland index when region='connected_component'. Get it from get_mesh_components_detail, which reports each piece's size and bounding box.
polygroup_layerNoOptional extended polygroup layer index for region='polygroup'.
max_triangle_idsNoCap on how many IDs to return when include_triangle_ids is on (default 1000). When the cap truncates, triangle_ids_truncated is true — the count in triangles_selected is still the real one.
source_material_idNoMaterialID to select when region='material_id'.
min_triangle_pointsNoHow many of a triangle's 3 points must be inside for it to count, 1-3 (default 3 = fully contained).
include_triangle_idsNoAlso return the resolved triangle IDs (default false; they can be thousands). The returned array is what set_mesh_material_id scope='triangles' consumes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior1/5

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

The description insists the operation is 'Read-only... without modifying anything', but the annotations declare readOnlyHint=false and destructiveHint=true. This is a direct, material contradiction about mutation/safety that an agent relying on the text would get wrong.

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

Conciseness4/5

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

Front-loaded with the core action and its sibling relationship, then the failure-mode rationale, then a compact return signature. Mostly tight, though the 'Returns:' block is appended as one long object literal and the sentences are slightly dense.

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 usefully documents the return shape (triangles_selected, is_empty, triangle_ids_truncated, etc.), covers the shared-resolver contract, and clarifies the coordinate frame. The only major gap is behavioral accuracy, which is scored separately as a contradiction.

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?

With 100% schema coverage the baseline is 3, and the description meaningfully adds the coordinate-frame semantics ('Coordinates are LOCAL to the dynamic mesh, not world'), which is exactly the kind of ambiguity (local vs world) not stated per-parameter in the schema. It does not, however, elaborate on individual region/mode params.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and resource ('Resolve a region into a triangle selection and REPORT it') and explicitly distinguishes itself from a sibling, set_mesh_material_id_in_region, as its 'read-only companion' with the same resolver. An agent can tell what this does and how it relates to the paint call without opening either schema.

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

Usage Guidelines5/5

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

It names the alternative tool (set_mesh_material_id_in_region), states the shared-resolver relationship, and gives a concrete when-to-use motive: previewing to avoid the failure mode where a mis-specified box selects 0 triangles yet the paint call returns success. Both the alternative and the selecting condition are explicit.

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