bp_add_function
Add a new function graph to an Unreal Blueprint, specifying the function signature and metadata for subsequent node-based editing.
Instructions
Add a new function graph to a Blueprint.
Creates a named function inside the Blueprint's function list. The function starts with a single 'entry' node. After creation use bp_add_node / bp_connect_pins / bp_set_pin_default to build the function body, then bp_compile to validate.
Args: blueprint_name: Blueprint asset name (e.g. 'BP_MyActor') function_name: Name for the new function (e.g. 'TakeDamage') return_type: Return pin type (e.g. 'float', 'bool', 'FVector'). Leave empty for void functions. params: JSON array of parameter objects, each with keys 'name' (str) and 'type' (str). E.g.: '[{"name":"DamageAmount","type":"float"}, {"name":"DamageCauser","type":"AActor"}]' category: Editor category for Blueprint palette grouping. is_pure: True = pure function (no exec pins). Default False. description: Tooltip text shown in Blueprint editor.
Returns: JSON StructuredResult. outputs.function_name — Confirmed function name outputs.graph_name — Graph name to use in subsequent bp_add_node calls outputs.next_steps — Suggested follow-up actions
KB: see knowledge_base/01_BLUEPRINT_FUNDAMENTALS.md#overview Example: bp_add_function(blueprint_name="/Game/MCP_Test/BP_Example", function_name="ExampleName")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| is_pure | No | ||
| category | No | ||
| description | No | ||
| return_type | No | ||
| function_name | Yes | ||
| blueprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |