Skip to main content
Glama

set_procedural_mesh_material

DestructiveIdempotent

Assign a material asset to a specific slot on an actor's procedural mesh component in Unreal Editor, verifying the result and returning the previous material path.

Instructions

Assign a material to one slot of the first UProceduralMeshComponent on an editor-world actor (found by label or object name) with SetMaterial, marking the actor package dirty without saving. Returns the loaded material_path, element_index and previous_material_path when the slot had a material. element_index may name a slot the component has (one per section, or an existing override) or the next one past them; a negative one, or one further past, is an error checked before anything changes. A slot that already holds the material succeeds with material_set false and a note, touching nothing; otherwise material_set is read back from the slot and the call fails when it is false.

Returns: { actor_label, material_path, element_index, material_set, previous_material_path?, note? }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actor_labelYesEditor label or object name of the actor; the first actor matching either is used
element_indexNoMaterial slot index, usually the section index; default 0; from 0 up to the larger of the section count and the override count
material_pathYesMaterial or material instance asset path, e.g. "/Game/Materials/M_Rock"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • changedInput schema / properties / element_index / description
      Previous value: -"Material slot index, usually the section index; default 0 (not range-checked)"New value: +"Material slot index, usually the section index; default 0; from 0 up to the larger of the section count and the override count"
  2. Changed3 schema fields changedv1.2.0
    • changedInput schema / properties / actor_label / description
      Previous value: -"Editor label of the actor carrying the component"New value: +"Editor label or object name of the actor; the first actor matching either is used"
    • changedInput schema / properties / element_index / description
      Previous value: -"Optional material slot index (default 0)"New value: +"Material slot index, usually the section index; default 0 (not range-checked)"
    • changedInput schema / properties / material_path / description
      Previous value: -"/Game path to the UMaterialInterface"New value: +"Material or material instance asset path, e.g. \"/Game/Materials/M_Rock\""
  3. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With annotations already declaring destructiveHint=true, idempotentHint=true and readOnlyHint=false, the description still adds substantial context: it marks the actor package dirty without saving, validates the index before anything changes, reports the previous material, and treats an already-set slot as a successful no-op with material_set=false. This is a genuine complement to the annotations rather than a restatement.

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?

The action and its target are front-loaded in the first clause, and the trailing sentences all carry distinct behavioral information (index validity, no-op case, read-back failure). It is dense and somewhat run-on, and the return-shape line partially duplicates the prose above it, but nothing is padding.

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?

No output schema exists, yet the description fully enumerates the return object (actor_label, material_path, element_index, material_set, previous_material_path?, note?), and with annotations covering the safety profile plus the failure/no-op semantics described inline, an agent has everything needed to call and interpret the result.

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 adds real semantics beyond the schema: element_index may be an existing section/override slot or the next one past them, and negative or too-far-past values are rejected before any mutation. actor_label's first-match-by-label-or-object-name rule is also spelled out in the schema, so the added value is concentrated in element_index.

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 precise verb and resource: assign a material to one slot of the first UProceduralMeshComponent on an editor-world actor, found by label or object name, via SetMaterial. The specificity of the resource (procedural mesh component, single slot) separates it from set_actor_material, set_dynamic_mesh_material and set_skeletal_mesh_material_slot without needing to name them.

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?

The description gives rich conditional behavior (which index values are legal, when the call errors, when it is a no-op), which implicitly frames usage, but it never states when to prefer this tool over the many sibling material-setting tools or what preconditions the actor/component must meet. Guidance is implied rather than 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