Skip to main content
Glama

mass_add_trait

Add a trait class to a MassEntity config asset in Unreal Editor, returning the updated trait list. Use this to extend entity behavior by assigning traits directly to the specified config asset.

Instructions

Add a trait class to a MassEntity config asset.

Args: config_asset: MassEntity config asset path or object path. trait_class: MassEntity trait class, short name or /Script path. save: Save the asset after mutation.

Returns: Structured JSON with the added trait and updated trait list.

KB: see knowledge_base/23_MASS_ENTITY_AND_STATETREE.md#mcp-mass-statetree-and-smartobject-tools Example: mass_add_trait(config_asset="/Game/Mass/EntityConfigs/EC_CrowdAgent", trait_class="MassLODTrait")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNo
trait_classYes
config_assetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose that this is a mutating operation, that saving occurs based on the save parameter, and that structured JSON is returned. However, it does not mention validation behavior, duplicate handling, failure modes, or what happens when the config asset does not exist.

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 description is well-structured, front-loaded with the core purpose, and followed by concise Args, Returns, KB, and Example sections. Every section earns its place, though the Args formatting could be more compact without losing clarity.

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?

For a three-parameter mutating tool, the description covers the call signature, parameter formats, save behavior, return value, a KB reference, and a concrete example. It does not cover prerequisite conditions or error handling, but the output schema and example reduce the missing context to a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain the parameters, and it does so thoroughly: config_asset accepts a path or object path, trait_class accepts a short name or /Script path, and save controls persistence after mutation. This adds meaningful semantic value beyond the raw schema fields.

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 first sentence states a specific verb and resource: 'Add a trait class to a MassEntity config asset.' This clearly distinguishes it from sibling tools like mass_create_entity_config and mass_inspect_entity_config, which create or inspect configs rather than mutating them by adding a trait.

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 implies when to use the tool through its wording, args, and example, but it does not explicitly state when to choose this over alternatives or provide any exclusions. The KB reference and example give helpful context, but there is no explicit when-not-to-use guidance.

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