Complete reference for all 10 Blueprint graph operations: inspect, create graphs, add variables and functions, place nodes, connect pins.
unreal_blueprints
The unreal_blueprints tool provides full programmatic access to Blueprint authoring — listing and inspecting Blueprints, reading graph topology, adding variables and functions, placing nodes, wiring pins, and setting default values. It exposes 10 operations.
Operations at a Glance
| Operation | Hint | Description |
|---|---|---|
list | readOnly | List all Blueprints in a content directory |
inspect | readOnly | Get full variable and component list for a Blueprint |
get_graph | readOnly | Return all nodes and connections in a named graph |
get_events | readOnly | List all event nodes in a Blueprint |
create | — | Create a new Blueprint (alias for unreal_assets create_blueprint) |
add_variable | — | Add a typed variable to a Blueprint |
add_function | — | Add a new function graph to a Blueprint |
add_node | — | Add a node to a Blueprint graph |
connect_pins | — | Connect two pins between nodes |
set_pin_value | idempotent | Set the default value of a node pin |
list
Lists all Blueprint assets in a content directory.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Content directory to search, e.g. /Game/Characters/ |
recursive | boolean | no | Include subdirectories. Default: false. |
parent_class | string | no | Filter by parent class name |
{
"operation": "list",
"params": {
"path": "/Game/Characters/",
"recursive": true
}
}
{
"operation": "list",
"params": {
"path": "/Game/",
"recursive": true,
"parent_class": "Character"
}
}
inspect
Returns the full structure of a Blueprint — variables, components, functions, event graphs, and parent class chain.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
{
"operation": "inspect",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin"
}
}
Response
{
"name": "BP_Enemy_Goblin",
"parent_class": "/Script/Engine.Character",
"variables": [
{ "name": "MaxHealth", "type": "float", "default": 100.0, "access": "public" },
{ "name": "AggroRange", "type": "float", "default": 800.0, "access": "public" },
{ "name": "bIsAggro", "type": "bool", "default": false, "access": "private" }
],
"components": [
{ "name": "CapsuleComponent", "class": "CapsuleComponent" },
{ "name": "SkeletalMeshComponent", "class": "SkeletalMeshComponent" },
{ "name": "CharacterMovement", "class": "CharacterMovementComponent" }
],
"functions": ["TakeDamage", "OnDeath", "BeginAggro"],
"event_graphs": ["EventGraph"],
"interfaces": ["BPI_Damageable"]
}
get_graph
Returns all nodes and pin connections in a specific Blueprint graph.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
graph | string | yes | Graph name, e.g. EventGraph, BeginPlay, or a function name |
{
"operation": "get_graph",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "EventGraph"
}
}
Response
{
"graph": "EventGraph",
"nodes": [
{
"id": "node_0",
"type": "K2Node_Event",
"name": "Event BeginPlay",
"position": { "x": -400, "y": 0 },
"pins": [
{ "name": "then", "direction": "output", "type": "exec" }
]
},
{
"id": "node_1",
"type": "K2Node_CallFunction",
"name": "SetActorHiddenInGame",
"position": { "x": -100, "y": 0 },
"pins": [
{ "name": "execute", "direction": "input", "type": "exec" },
{ "name": "then", "direction": "output", "type": "exec" },
{ "name": "bNewHidden", "direction": "input", "type": "bool", "default_value": "false" }
]
}
],
"connections": [
{ "from_node": "node_0", "from_pin": "then", "to_node": "node_1", "to_pin": "execute" }
]
}
get_events
Lists all event nodes across all graphs in a Blueprint.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
{
"operation": "get_events",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin"
}
}
Response
{
"events": [
{ "name": "Event BeginPlay", "graph": "EventGraph", "node_id": "node_0" },
{ "name": "Event Tick", "graph": "EventGraph", "node_id": "node_4" },
{ "name": "Event TakeDamage", "graph": "EventGraph", "node_id": "node_12" }
]
}
create
Creates a new Blueprint class. This is an alias for unreal_assets / create_blueprint and uses the same parameters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Destination content path including asset name |
parent_class | string | yes | Parent class path |
{
"operation": "create",
"params": {
"path": "/Game/Items/BP_Weapon_Sword",
"parent_class": "/Script/Engine.Actor"
}
}
add_variable
Adds a new variable to a Blueprint. Supports all UE variable types.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
name | string | yes | Variable name (no spaces, PascalCase recommended) |
type | string | yes | Variable type. See type list below. |
default_value | any | no | Default value for the variable |
access | string | no | public, protected, or private. Default: private. |
instance_editable | boolean | no | Expose to instance details panel. Default: false. |
blueprint_readonly | boolean | no | Show in panel but not editable. Default: false. |
Supported Types
| Type String | UE Type |
|---|---|
bool | Boolean |
int | Integer |
float | Float |
string | String |
name | Name |
text | Text |
vector | FVector |
rotator | FRotator |
transform | FTransform |
object | Object reference (requires object_class) |
class | Class reference |
array<float> | TArray<float> (prefix any type with array<>) |
{
"operation": "add_variable",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"name": "AggroRange",
"type": "float",
"default_value": 800.0,
"access": "public",
"instance_editable": true
}
}
{
"operation": "add_variable",
"params": {
"path": "/Game/Characters/BP_Player",
"name": "Inventory",
"type": "array<object>",
"object_class": "/Game/Items/BP_ItemBase"
}
}
add_function
Creates a new function graph in a Blueprint.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
name | string | yes | Function name (PascalCase recommended) |
inputs | array | no | Input parameters. Each: { name, type } |
outputs | array | no | Output parameters. Each: { name, type } |
access | string | no | public, protected, or private. Default: public. |
pure | boolean | no | If true, creates a pure (no exec pin) function. Default: false. |
{
"operation": "add_function",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"name": "CalculateDamage",
"inputs": [
{ "name": "BaseDamage", "type": "float" },
{ "name": "ArmorValue", "type": "float" }
],
"outputs": [
{ "name": "FinalDamage", "type": "float" }
],
"access": "public"
}
}
Response
{
"function": "CalculateDamage",
"graph": "CalculateDamage",
"entry_node_id": "node_0",
"return_node_id": "node_1"
}
add_node
Places a Blueprint node in a graph. The node type determines what kind of node is placed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
graph | string | yes | Target graph name |
node_type | string | yes | Node type identifier (see common types below) |
position | object | no | { x, y } position in the graph canvas |
params | object | no | Node-specific configuration (varies by type) |
Common Node Types
node_type | Description | Key params fields |
|---|---|---|
function_call | Call a function | function (full path or name) |
variable_get | Read a variable | variable |
variable_set | Write a variable | variable |
branch | If/Else branch | — |
sequence | Sequential execution | num_outputs |
for_each | Array iteration | — |
cast | Cast to class | class |
event | Custom event | event_name |
macro | Macro instance | macro |
comment | Comment box | text, width, height |
{
"operation": "add_node",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "CalculateDamage",
"node_type": "function_call",
"params": {
"function": "FMath::Clamp"
},
"position": { "x": 200, "y": 0 }
}
}
{
"operation": "add_node",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "EventGraph",
"node_type": "variable_get",
"params": {
"variable": "MaxHealth"
},
"position": { "x": -200, "y": 100 }
}
}
Response
{
"node_id": "node_7",
"node_type": "function_call",
"position": { "x": 200, "y": 0 },
"pins": [
{ "name": "execute", "direction": "input", "type": "exec" },
{ "name": "then", "direction": "output", "type": "exec" },
{ "name": "Value", "direction": "input", "type": "float" },
{ "name": "Min", "direction": "input", "type": "float" },
{ "name": "Max", "direction": "input", "type": "float" },
{ "name": "ReturnValue", "direction": "output", "type": "float" }
]
}
connect_pins
Wires two pins together. Both nodes must already exist in the same graph.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
graph | string | yes | Graph containing both nodes |
from_node | string | yes | Source node ID |
from_pin | string | yes | Source pin name |
to_node | string | yes | Destination node ID |
to_pin | string | yes | Destination pin name |
{
"operation": "connect_pins",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "EventGraph",
"from_node": "node_0",
"from_pin": "then",
"to_node": "node_1",
"to_pin": "execute"
}
}
Note: Pin types must be compatible. Connecting an exec pin to a data pin will return a validation error. Use
get_graphto retrieve pin names and types before connecting.
set_pin_value
Sets the default (literal) value of a node's input pin. This sets the inline value shown in the graph when no wire is connected to the pin.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Full content path of the Blueprint |
graph | string | yes | Graph containing the node |
node | string | yes | Node ID |
pin | string | yes | Pin name |
value | any | yes | The literal value to set |
{
"operation": "set_pin_value",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "CalculateDamage",
"node": "node_7",
"pin": "Min",
"value": 0.0
}
}
{
"operation": "set_pin_value",
"params": {
"path": "/Game/Characters/Enemies/BP_Enemy_Goblin",
"graph": "CalculateDamage",
"node": "node_7",
"pin": "Max",
"value": 999.0
}
}
Complete Workflow: Blueprint From Scratch
This example creates a health component Blueprint end-to-end.
// 1. Create the Blueprint
await create({
path: "/Game/Components/BP_HealthComponent",
parent_class: "/Script/Engine.ActorComponent"
})
// 2. Add variables (can parallelize — different variable names)
await parallel([
add_variable({ path: "...", name: "MaxHealth", type: "float", default_value: 100.0, instance_editable: true }),
add_variable({ path: "...", name: "CurrentHealth", type: "float", default_value: 100.0 }),
add_variable({ path: "...", name: "bIsDead", type: "bool", default_value: false }),
])
// 3. Add function
const fn = await add_function({
path: "/Game/Components/BP_HealthComponent",
name: "ApplyDamage",
inputs: [{ name: "DamageAmount", type: "float" }],
outputs: [{ name: "bKilled", type: "bool" }]
})
// 4. Place nodes in the function graph
const subNode = await add_node({
path: "...", graph: "ApplyDamage",
node_type: "function_call",
params: { function: "FMath::Max" },
position: { x: 200, y: 0 }
})
const setNode = await add_node({
path: "...", graph: "ApplyDamage",
node_type: "variable_set",
params: { variable: "CurrentHealth" },
position: { x: 500, y: 0 }
})
// 5. Wire them
await connect_pins({
path: "...", graph: "ApplyDamage",
from_node: fn.entry_node_id, from_pin: "then",
to_node: subNode.node_id, to_pin: "execute"
})
await connect_pins({
path: "...", graph: "ApplyDamage",
from_node: subNode.node_id, from_pin: "ReturnValue",
to_node: setNode.node_id, to_pin: "CurrentHealth"
})
// 6. Set literal values
await set_pin_value({ path: "...", graph: "ApplyDamage", node: subNode.node_id, pin: "B", value: 0.0 })
// 7. Save
await unreal_assets.save({ paths: ["/Game/Components/BP_HealthComponent"] })