Skip to main content
Glama

add_custom_function

Add custom functions to Unreal Engine Blueprints with configurable parameters and return values to implement reusable logic in automated authoring workflows.

Instructions

Add a custom function to a Blueprint.

Functions have their own local variable scope, can return values, and are reusable across the Blueprint.

Args: blueprint_name: Blueprint name function_name: Function name inputs: List of input params [{"name": "DamageIn", "type": "Float"}] outputs: List of output params [{"name": "HealthOut", "type": "Float"}] is_pure: Pure functions have no exec pin (like math functions)

KB: see knowledge_base/02_BLUEPRINT_COMMUNICATION.md#overview Example: add_custom_function(blueprint_name="/Game/MCP_Test/BP_Example", function_name="ExampleName")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNo
is_pureNo
outputsNo
function_nameYes
blueprint_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that functions have their own scope, can return values, and are reusable, and clarifies is_pure behavior. However, it doesn't mention side effects, permissions, or whether the blueprint is modified in place, leaving some behavioral gaps 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.

Conciseness4/5

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

The description is front-loaded with the primary purpose, followed by a compact Args section, a KB reference, and an example. It is efficient without unnecessary fluff, though the example could be considered slightly redundant given the Args section.

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?

For a tool of moderate complexity, the description covers function concept, parameters, example, and KB link. It mentions return values, so output semantics are hinted. It lacks details on error handling or compilation side effects, but these are minor given the existing output schema and overall clarity.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. The Args section explains each parameter with examples for inputs/outputs format and clarifies is_pure. This adds meaningful context beyond the bare schema property names.

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

Purpose4/5

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

The description clearly states 'Add a custom function to a Blueprint' with specific verb and resource. It distinguishes from sibling tools like add_custom_macro by noting functions have their own local variable scope and can return values. It doesn't explicitly name alternatives but the purpose is unambiguous.

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 explains what the tool does but provides no explicit guidance on when to use it versus alternative tools like add_blueprint_function_node or add_custom_macro. It implies usage by describing function characteristics, but lacks when-not-to-use or alternative routing.

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