Skip to main content
Glama

set_polygroup_material_id

DestructiveIdempotent

Assign a MaterialID to every triangle in a polygroup to paint parts cheaply. Check polygroup_id_valid to confirm the group existed and painting applied.

Instructions

Stamp a MaterialID onto every triangle of one polygroup via UGeometryScriptLibrary_MeshMaterialFunctions::SetPolygroupMaterialID. This is usually the cheapest way to paint a part: append_mesh_primitive lays primitives down with PerFace polygroups, so each appended piece is already its own group. HONEST GATE: the engine reports whether the polygroup ID actually existed, and that flag is surfaced as polygroup_id_valid — a false there means nothing was painted, even though the call succeeded.

Returns: { actor_name, polygroup_id, material_id, polygroup_id_valid: bool, max_material_id_after: int, distinct_material_ids_after: int, applied: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actor_nameYesLabel or name of the target DynamicMeshActor.
material_idNoMaterialID to write (>= 0).
polygroup_idNoPolygroup ID to repaint.
polygroup_layerNoOptional extended polygroup layer index. Omit for the default layer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare this as a destructive, idempotent, non-read-only write. The description adds an important behavioral caveat beyond annotations: the engine's polygroup existence check is surfaced as polygroup_id_valid, and a false value means nothing was painted even though the call succeeded.

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

Conciseness5/5

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

Front-loads the action and scope, then adds usage context and the critical failure-mode warning before listing return fields. The return list is useful because no output schema exists, and the description avoids redundancy or filler.

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

Completeness5/5

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

Without an output schema, the description supplies the return shape, including the polygroup_id_valid and applied flags. Combined with annotations that cover safety and a schema that fully documents parameters, it gives an agent enough context to invoke and interpret the tool.

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 the input schema already documents actor_name, material_id, polygroup_id, and polygroup_layer. The description reinforces the one-polygroup scope but adds no syntax or format meaning beyond what the schema provides, so the baseline 3 is appropriate.

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?

States a specific verb (Stamp), resource (MaterialID), and scope (every triangle of one polygroup), and identifies the underlying engine function. It also differentiates itself from append_mesh_primitive by explaining that append_mesh_primitive creates the PerFace polygroups this tool then paints.

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?

Makes clear this is usually the cheapest way to paint a part and ties that guidance to meshes built via append_mesh_primitive, where each appended piece is already a polygroup. It does not explicitly state when not to use it or name alternative material-id setters such as set_mesh_material_id_in_region.

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