Skip to main content
Glama

add_construction_script_for_loop

Add a For Loop node to a Blueprint's Construction Script to iterate over rows and instances, enabling procedural 2D grid generation in Unreal Editor.

Instructions

Add a For Loop node in a Blueprint's Construction Script.

From Ch. 19: Used in BP_ProceduralMeshes Construction Script to iterate over rows and instances. Nested For Loops create 2D grids of instances.

The Construction Script runs in the Editor when an instance is placed or its properties are changed, making it perfect for procedural generation.

Args: blueprint_name: Blueprint to add the node to first_index: Starting index (usually 1 for 1-based counting) last_index_variable: Variable providing the max loop count nested: Whether this is a nested (inner) loop node_position: [X, Y] graph position

KB: see knowledge_base/10_WORLD_BUILDING.md#overview Example: add_construction_script_for_loop(blueprint_name="/Game/MCP_Test/BP_Example")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nestedNo
first_indexNo
node_positionNo
blueprint_nameYes
last_index_variableNoNumberOfRows

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior2/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 of behavioral disclosure. It adds useful background about Construction Script executing in the Editor, but it does not disclose tool-side side effects such as whether the node is auto-connected, whether the Construction Script graph is created if missing, whether the blueprint is compiled/saved, or what the operation returns. This is a meaningful gap for a graph-mutating 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 action sentence is front-loaded, followed by relevant context, an organized Args list, a KB pointer, and a minimal example. There is little wasted text, though the 'From Ch. 19' reference is cryptic without surrounding documentation, and the description is slightly longer than strictly necessary for a simple node-add operation.

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

Completeness3/5

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

For a graph-mutation tool with 5 parameters, no annotations, and many sibling blueprint/loop tools, the description covers purpose, parameters, context, and an example. It is missing routing guidance against similar tools, prerequisites about the Construction Script graph, and the expected mutation/compile workflow. It is usable for the happy path but not fully complete.

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 Args section is the only semantic source. It explains all five parameters in plain language, clarifies that first_index is usually 1-based, that last_index_variable is a variable providing the max loop count, and that node_position is an [X, Y] coordinate. This compensates well for the empty schema, though the explanations could go deeper on formatting and constraints.

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 opens with 'Add a For Loop node in a Blueprint's Construction Script,' giving a specific verb, resource, and node type. This clearly distinguishes it from generic loop-node siblings like add_blueprint_for_loop_node and add_for_each_loop_node by anchoring it to the Construction Script context. The BP_ProceduralMeshes example further reinforces exactly what kind of loop this tool creates.

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

Usage Guidelines4/5

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

The description provides clear usage context: it is used in a Construction Script to iterate over rows and instances, and nested loops create 2D grids. It also explains why Construction Script is well-suited for procedural generation. However, it does not explicitly state when not to use it or name alternative loop/blueprint tools, so it stops short of a 5.

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