Blueprints
This content is not available in your language yet.
50 tools — 0 typed MCP · 46 via cu CLI · 4 MCP-only composite.
- Blueprints — Creation & Components — 14 tools
- Blueprints — Graph Nodes — 31 tools
- Blueprints — Interfaces — 2 tools
- Blueprints — Composite Tools — 3 tools
Blueprints — Creation & Components
Section titled “Blueprints — Creation & Components”create_blueprint CLI
Section titled “create_blueprint ”Create a new Blueprint class with a specified parent (Actor, Pawn, Character).
@mcp.tool()@showcase( "Create a new Blueprint class with a specified parent (Actor, Pawn, Character).", featured=True,)def create_blueprint( ctx: Context, name: str, parent_class: str) -> ToolResult: """[BP-Edit] Create a new Blueprint class.
Anti-patterns: - Do not pass an empty ``name`` — handler rejects empty asset names. - Do not include the asset extension or full path in ``name`` (no ``.uasset``, no ``/Game/...`` prefix); this is the leaf asset name only. The asset is placed under ``/Game/Blueprints/`` by default. - Do not pass an unresolvable ``parent_class`` (typo, missing module). Common valid values: ``"Actor"``, ``"Pawn"``, ``"Character"``, ``"ActorComponent"``, ``"UserWidget"``, or a fully-qualified path like ``"/Script/Engine.PlayerController"``.
Args: name: Leaf asset name (e.g. ``"BP_Door"``, NOT ``"/Game/.../BP_Door"``) parent_class: Parent UClass short name or full path """ # Import inside function to avoid circular imports from claude_unreal_server import get_unreal_connection
try: unreal = get_unreal_connection() if not unreal: logger.error("Failed to connect to Unreal Engine") return err(f"Failed to create blueprint '{name}': no response from Unreal Engine")
response = unreal.send_command("create_blueprint", { "name": name, "parent_class": parent_class })
if not response: logger.error("No response from Unreal Engine") return err(f"Failed to create blueprint '{name}': no response from Unreal Engine")
logger.info(f"Blueprint creation response: {response}")
result = response.get("result", response) if response.get("status") == "error" or result.get("success") is False: error_message = response.get("error") or result.get("error") or result.get("message") or "unknown error" return err(f"Failed to create blueprint '{name}': {error_message}", error=error_message)
already_exists = result.get("already_exists") if already_exists: return ok(f"Blueprint '{name}' already exists (parent {parent_class})") return ok(f"Created blueprint '{name}' with parent {parent_class}")
except Exception as e: error_msg = f"Error creating blueprint: {e}" logger.error(error_msg) return err(f"Failed to create blueprint '{name}'", error=str(e))add_component_to_blueprint CLI
Section titled “add_component_to_blueprint ”Add components (StaticMesh, Camera, Light, etc.) to a Blueprint with transform and properties.
@mcp.tool()@showcase( "Add components (StaticMesh, Camera, Light, etc.) to a Blueprint with transform and properties.", featured=True,)def add_component_to_blueprint( ctx: Context, blueprint_name: str, component_type: str, component_name: str, location: List[float] = [], rotation: List[float] = [], scale: List[float] = [], component_properties: Dict[str, Any] = {}) -> ToolResult: """[BP-Edit] Add a component to a Blueprint.
Anti-patterns: - Do not pass an unknown ``component_type`` — handler accepts class names with or without ``U`` prefix and ``Component`` suffix (e.g. ``"StaticMesh"``, ``"StaticMeshComponent"``, ``"UStaticMeshComponent"`` all work), but the class must derive from ``UActorComponent`` or the call is rejected. - Do not pass ``location``/``rotation``/``scale`` with anything other than exactly 3 floats — Python wrapper rejects malformed vectors.
Args: blueprint_name: Name of the target Blueprint component_type: Type of component to add (use component class name without U prefix) component_name: Name for the new component location: [X, Y, Z] coordinates for component's position rotation: [Pitch, Yaw, Roll] values for component's rotation scale: [X, Y, Z] values for component's scale component_properties: Additional properties to set on the component
Returns: Information about the added component """ from claude_unreal_server import get_unreal_connection
try: # Ensure all parameters are properly formatted params = { "blueprint_name": blueprint_name, "component_type": component_type, "component_name": component_name, "location": location or [0.0, 0.0, 0.0], "rotation": rotation or [0.0, 0.0, 0.0], "scale": scale or [1.0, 1.0, 1.0] }
# Add component_properties if provided if component_properties and len(component_properties) > 0: params["component_properties"] = component_properties
# Validate location, rotation, and scale formats for param_name in ["location", "rotation", "scale"]: param_value = params[param_name] if not isinstance(param_value, list) or len(param_value) != 3: logger.error(f"Invalid {param_name} format: {param_value}. Must be a list of 3 float values.") return err(f"Failed to add component: invalid {param_name}", error=f"{param_name} must be a list of 3 float values") # Ensure all values are float params[param_name] = [float(val) for val in param_value]
unreal = get_unreal_connection() if not unreal: logger.error("Failed to connect to Unreal Engine") return err(f"Failed to add component '{component_name}' to '{blueprint_name}': no response from Unreal Engine")
logger.info(f"Adding component to blueprint with params: {params}") response = unreal.send_command("add_component_to_blueprint", params)
if not response: logger.error("No response from Unreal Engine") return err(f"Failed to add component '{component_name}' to '{blueprint_name}': no response from Unreal Engine")
logger.info(f"Component addition response: {response}") if response.get("status") == "error": return err(f"Failed to add component '{component_name}' to '{blueprint_name}'", error=response.get("error", "Unknown error")) result = response.get("result", response) return ok(f"Added component '{component_name}' ({component_type}) to '{blueprint_name}'", **result)
except Exception as e: error_msg = f"Error adding component to blueprint: {e}" logger.error(error_msg) return err(f"Failed to add component '{component_name}' to '{blueprint_name}'", error=str(e))set_static_mesh_properties CLI
Section titled “set_static_mesh_properties ”set_component_property CLI
Section titled “set_component_property ”set_physics_properties CLI
Section titled “set_physics_properties ”set_blueprint_property CLI
Section titled “set_blueprint_property ”compile_blueprint CLI
Section titled “compile_blueprint ”delete_blueprint CLI
Section titled “delete_blueprint ”rename_blueprint CLI
Section titled “rename_blueprint ”reparent_blueprint CLI
Section titled “reparent_blueprint ”get_blueprint_info CLI
Section titled “get_blueprint_info ”list_blueprint_components CLI
Section titled “list_blueprint_components ”remove_component_from_blueprint CLI
Section titled “remove_component_from_blueprint ”autolayout_blueprint_graph CLI
Section titled “autolayout_blueprint_graph ”Blueprints — Graph Nodes
Section titled “Blueprints — Graph Nodes”connect_blueprint_nodes CLI
Section titled “connect_blueprint_nodes ”Wire two Blueprint graph nodes together by specifying source/target pins.
@mcp.tool()@showcase( "Wire two Blueprint graph nodes together by specifying source/target pins.", featured=True,)def connect_blueprint_nodes( ctx: Context, blueprint_name: str, source_node_id: str, source_pin: str, target_node_id: str, target_pin: str, graph_name: str = "EventGraph") -> ToolResult: """[BP-Node] Connect two nodes in a Blueprint graph.
Anti-patterns: - Do not connect an exec pin (``exec``/``then``/``execute``) to a value pin or vice-versa — UE's K2 schema rejects mismatched pin categories. - Do not pass node IDs from a different ``graph_name`` than the one being connected — handler searches only the named graph and rejects with "Source or target node not found". - Do not pass a ``source_pin``/``target_pin`` name that does not exist on the resolved node — connection silently fails. Inspect available pins via the response of the node-creation call (most return a ``pins`` list).
Args: blueprint_name: Name of the target Blueprint source_node_id: ID of the source node source_pin: Name of the output pin on the source node target_node_id: ID of the target node target_pin: Name of the input pin on the target node graph_name: Name of the graph containing the nodes (default: "EventGraph"). Use the function name (e.g. "LoadCharacterList") for custom function graphs.
Returns: Response indicating success or failure """ from claude_unreal_server import get_unreal_connection
try: params = { "blueprint_name": blueprint_name, "source_node_id": source_node_id, "source_pin": source_pin, "target_node_id": target_node_id, "target_pin": target_pin, "graph_name": graph_name }
unreal = get_unreal_connection() if not unreal: logger.error("Failed to connect to Unreal Engine") return err("connect_blueprint_nodes: failed to connect to Unreal Engine")
logger.info(f"Connecting nodes in blueprint '{blueprint_name}'") response = unreal.send_command("connect_blueprint_nodes", params)
if not response: logger.error("No response from Unreal Engine") return err("connect_blueprint_nodes: no response from Unreal Engine") if response.get("status") == "error": return err("Failed to connect nodes", error=response.get("error", "Unknown error")) result = response.get("result", response) logger.info(f"Node connection response: {response}") return ok(f"Connected nodes in '{blueprint_name}'", **result)
except Exception as e: error_msg = f"Error connecting nodes: {e}" logger.error(error_msg) return err("connect_blueprint_nodes failed", error=error_msg)