Intermediate

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

OperationHintDescription
listreadOnlyList all Blueprints in a content directory
inspectreadOnlyGet full variable and component list for a Blueprint
get_graphreadOnlyReturn all nodes and connections in a named graph
get_eventsreadOnlyList all event nodes in a Blueprint
createCreate a new Blueprint (alias for unreal_assets create_blueprint)
add_variableAdd a typed variable to a Blueprint
add_functionAdd a new function graph to a Blueprint
add_nodeAdd a node to a Blueprint graph
connect_pinsConnect two pins between nodes
set_pin_valueidempotentSet the default value of a node pin

list

Lists all Blueprint assets in a content directory.

Parameters

ParameterTypeRequiredDescription
pathstringyesContent directory to search, e.g. /Game/Characters/
recursivebooleannoInclude subdirectories. Default: false.
parent_classstringnoFilter 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

ParameterTypeRequiredDescription
pathstringyesFull 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
graphstringyesGraph 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

ParameterTypeRequiredDescription
pathstringyesFull 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

ParameterTypeRequiredDescription
pathstringyesDestination content path including asset name
parent_classstringyesParent 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
namestringyesVariable name (no spaces, PascalCase recommended)
typestringyesVariable type. See type list below.
default_valueanynoDefault value for the variable
accessstringnopublic, protected, or private. Default: private.
instance_editablebooleannoExpose to instance details panel. Default: false.
blueprint_readonlybooleannoShow in panel but not editable. Default: false.

Supported Types

Type StringUE Type
boolBoolean
intInteger
floatFloat
stringString
nameName
textText
vectorFVector
rotatorFRotator
transformFTransform
objectObject reference (requires object_class)
classClass 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
namestringyesFunction name (PascalCase recommended)
inputsarraynoInput parameters. Each: { name, type }
outputsarraynoOutput parameters. Each: { name, type }
accessstringnopublic, protected, or private. Default: public.
purebooleannoIf 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
graphstringyesTarget graph name
node_typestringyesNode type identifier (see common types below)
positionobjectno{ x, y } position in the graph canvas
paramsobjectnoNode-specific configuration (varies by type)

Common Node Types

node_typeDescriptionKey params fields
function_callCall a functionfunction (full path or name)
variable_getRead a variablevariable
variable_setWrite a variablevariable
branchIf/Else branch
sequenceSequential executionnum_outputs
for_eachArray iteration
castCast to classclass
eventCustom eventevent_name
macroMacro instancemacro
commentComment boxtext, 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
graphstringyesGraph containing both nodes
from_nodestringyesSource node ID
from_pinstringyesSource pin name
to_nodestringyesDestination node ID
to_pinstringyesDestination 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_graph to 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

ParameterTypeRequiredDescription
pathstringyesFull content path of the Blueprint
graphstringyesGraph containing the node
nodestringyesNode ID
pinstringyesPin name
valueanyyesThe 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"] })