add_blueprint_cast_node
Adds a Cast node to a Blueprint graph, letting you convert an object reference to a target class for type-safe access to its members.
Instructions
Add a Cast node (K2Node_DynamicCast) to a Blueprint graph.
Args: blueprint_name: Asset name of the Blueprint. cast_target_class: Class to cast to. Accepts short names like 'AIController', 'ThePlayerCharacter', or full paths like '/Script/AIModule.AIController'. graph_name: Graph to add to. Default 'EventGraph'. node_position: Optional [X, Y] canvas position.
Returns: Dict with 'node_id', 'node_name', 'cast_class', and 'pins' (execute, Object, then/cast-success, CastFailed, As).
KB: see knowledge_base/01_BLUEPRINT_FUNDAMENTALS.md#overview Example: add_blueprint_cast_node(blueprint_name="/Game/MCP_Test/BP_Example", cast_target_class="Actor")
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"blueprint_name": "<blueprint_name>",
"cast_target_class": "<cast_target_class>"
},
"name": "add_blueprint_cast_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| graph_name | No | EventGraph | |
| node_position | No | ||
| blueprint_name | Yes | ||
| cast_target_class | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |