Skip to main content
Glama

get_mesh_material_ids

Read-onlyIdempotent

Read the per-triangle MaterialID histogram of a DynamicMeshActor to verify material paint writes landed and detect meshes lacking MaterialIDs.

Instructions

Read the per-triangle MaterialID distribution of a DynamicMeshActor's live dynamic mesh via UGeometryScriptLibrary_MeshMaterialFunctions::GetMaxMaterialID + GetAllTriangleMaterialIDs. Read-only. This is the ORACLE for every MaterialID write: it returns a per-ID triangle histogram, so "did the paint actually land?" is answerable with a read instead of trusting a success flag. IMPORTANT: has_material_ids=false means the mesh has no MaterialID attribute at all, which is exactly the state in which writes are silently dropped by the engine.

Returns: { actor_name, has_material_ids: bool, max_material_id: int, triangle_count: int, distinct_material_ids: int, histogram: [ { material_id: int, triangle_count: int } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actor_nameYesLabel or name of the target DynamicMeshActor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover the read-only/idempotent safety profile, but the description goes well beyond them: it warns that has_material_ids=false means writes are silently dropped by the engine, which is a non-obvious and high-value behavioral trait. It also discloses the exact return payload shape.

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 purpose and tightly organized, with an IMPORTANT callout for the failure mode. The opening sentence is dense with the fully-qualified API path, which is slightly more than needed but not wasteful.

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?

There is no output schema, yet the description fully enumerates the returned fields and the histogram structure, plus the critical has_material_ids semantics. An agent has everything needed to call and interpret it correctly.

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 coverage is 100% with a single actor_name param already described in the schema. The description adds only the framing that the actor must have a live dynamic mesh, which is marginal beyond the schema itself; baseline 3 applies.

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+resource: reads the per-triangle MaterialID distribution of a DynamicMeshActor's live dynamic mesh, naming the underlying UE functions. It is clearly distinguishable from siblings like get_mesh_has_attribute_set, remap_material_ids, and set_mesh_material_id.

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?

Explicitly frames itself as the ORACLE for MaterialID writes and explains the verification workflow (read instead of trusting a success flag). It provides clear context for when to reach for it, though it does not explicitly name alternative sibling tools or state exclusion conditions.

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