Skip to main content
Glama

add_attribute_to_set

Add a GameplayAttributeData variable to an AttributeSet Blueprint, set its base and current value, then compile and save it.

Instructions

Add one FGameplayAttributeData member variable to an AttributeSet Blueprint, with default_value as its BaseValue and CurrentValue, then compile and save it. A name that is already an attribute of the class is left as it is (added false, already_existed true); a name taken by a variable of another type fails. attribute_present and base_value are read from the compiled class; refused during PIE.

Returns: { attribute_set_path: string, attribute_name: string, default_value: number, added: bool, already_existed: bool, attribute_present: bool, base_value?: number, default_applied?: bool, saved: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
default_valueNoInitial BaseValue and CurrentValue of the attribute, default 0; not applied to an attribute that already exists.
attribute_nameYesName of the new attribute member variable
attribute_set_pathYesFull asset path of the AttributeSet Blueprint

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / default_value / description
      Previous value: -"Initial value for the attribute, default 0"New value: +"Initial BaseValue and CurrentValue of the attribute, default 0; not applied to an attribute that already exists."
  2. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=false), the description discloses compile-and-save side effects, exact idempotency semantics for pre-existing names, failure on type collision, and that attributes are set during construction. It even documents the PIE refusal and the force override's risk — information not available elsewhere.

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 action and its effects, followed by the three outcome cases and a return-shape list. The Returns block is verbose but earns its place since there is no output schema; overall dense but orderly.

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?

With no output schema, the description supplies the return fields explicitly, and it covers failure modes, PIE constraints, and idempotency. Nothing an agent needs in order to call this mutation correctly appears to be missing.

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 already 100%, so the baseline is 3. The description adds real meaning on top: default_value becomes both BaseValue and CurrentValue, and is not applied to an already-existing attribute, plus a note that attribute_present/base_value are read from the compiled class.

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 gives a precise verb+resource: add one FGameplayAttributeData member variable to an AttributeSet Blueprint, with the concrete side effects (compile and save). This is distinguishable from siblings like add_blueprint_variable or create_attribute_set_blueprint without opening any schema.

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?

It clearly states outcome conditions (existing attribute name left as-is; a name taken by another type fails) and the PIE restriction with retry advice. It does not name an alternative tool or say when to prefer this over sibling attribute/variable tools, so 4 rather than 5.

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