Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
paramsNo
is_pureNo
categoryNo
descriptionNo
return_typeNo
function_nameYes
blueprint_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the function starts with an entry node, that subsequent steps are needed, and returns specific fields. However, it does not mention prerequisites (e.g., blueprint must exist), name uniqueness constraints, or error handling, which are important behavioral aspects for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized: a one-line summary, a brief workflow, a bulleted argument list with examples, return values, KB reference, and an example call. It is detailed but not redundant, and the essential purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, workflow, parameters, return values, and references a KB doc. It lacks explicit error conditions or preconditions, but for a tool with 7 parameters and a clear output schema, it is largely complete. The only notable gap is the lack of discussion on failure scenarios or required blueprint path format beyond an example.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain each parameter. It does so thoroughly: blueprint_name and function_name get examples, return_type explains void usage, params includes a full JSON example, and is_pure, category, description are clarified. This adds substantial meaning beyond the schema's bare titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-resource pair: 'Add a new function graph to a Blueprint.' It further clarifies that it creates a named function in the Blueprint's function list, which is distinct from adding nodes or variables. The 'entry' node detail distinguishes it from generic graph creation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear workflow sequence ('After creation use bp_add_node / bp_connect_pins / bp_set_pin_default... then bp_compile'), implying this is the first step in building a function. However, it does not explicitly mention alternative tools (e.g., add_custom_function, bp_create_graph) or state when not to use this tool, leaving the choice somewhat implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools