bp_add_variable
Add a member variable to an Unreal Engine Blueprint with type support for primitives, vectors, and objects. Configure default value, expose in details panel, and group under a category.
Instructions
Add a member variable to a Blueprint with full type support.
After adding a variable, use bp_add_node with 'variable_get:VarName' or 'variable_set:VarName' to place GET/SET nodes in the graph.
Supported variable_type values: Boolean, Integer, Integer64, Float, Double, String, Name, Text, Vector, Rotator, Transform, Object/ (e.g. 'Object//Script/Engine.StaticMeshComponent')
Args: blueprint_name: Blueprint asset name variable_name: New variable name (e.g. 'Health', 'bIsAlive') variable_type: Type string (see above) default_value: Optional initial value string is_exposed: Expose in Details panel (BlueprintVisible + EditAnywhere) category: Category for Details panel grouping. Default 'Default'
Returns: JSON string with StructuredResult. outputs.variable_name, variable_type, is_exposed, default_value
KB: see knowledge_base/01_BLUEPRINT_FUNDAMENTALS.md#overview Example: bp_add_variable(blueprint_name="/Game/MCP_Test/BP_Example", variable_name="ExampleName", variable_type="ExampleName")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Default | |
| is_exposed | No | ||
| default_value | No | ||
| variable_name | Yes | ||
| variable_type | Yes | ||
| blueprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |