Skip to main content
Glama

add_foliage_instances

Destructive

Place foliage instances of a UFoliageType at explicit transforms in the level's InstancedFoliageActor. Warning: this path can crash the editor; use instanced static mesh components instead.

Instructions

Place foliage instances of a UFoliageType at explicit transforms in the level's InstancedFoliageActor. DANGER: measured CRASHING the editor process (access violation inside UnrealEditor-FoliageEdit.dll) -- reproducibly, and a single instance crashes just like a thousand, so trimming the count does not help. The reply you see is a "Connection reset", which reads like a network hiccup and is not. Use add_instanced_static_mesh_component + add_ism_instance instead: an InstancedFoliageActor is itself an actor holding instanced-static-mesh components, so it is the same code path minus the crash. Save your work before calling this at all.

Returns: { foliage_type_path: string, foliage_type: string, requested: int, instances_added: int, instance_count_before: int, instance_count: int, placed_instance_count: int, instances_added_ok: bool, foliage_actor: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transformsYesList of [x,y,z] locations or objects with location, rotation, scale
foliage_type_pathYesFull path of the UFoliageType asset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes far beyond by disclosing a reproducible editor crash (access violation in FoliageEdit.dll), that instance count is irrelevant to the crash, and that the failure surfaces as a misleading 'Connection reset'. This is exactly the kind of hidden behavior annotations cannot convey.

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?

Front-loaded with the action, then the DANGER warning, then the alternative and return shape. Every sentence carries load, though the enumerated return-object listing is somewhat bulky; it is justified given there is no output schema.

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

Completeness5/5

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

For a destructive, crash-prone tool with no output schema, the description covers the action, the danger, the workaround, and the returned fields. An agent has everything needed to decide and to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100% (transforms and foliage_type_path both documented), so the schema carries parameter meaning. The description adds no format or constraint detail beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb+resource+scope: placing UFoliageType instances at explicit transforms into the level's InstancedFoliageActor. This clearly distinguishes it from the scatter_* siblings and from add_ism_instance, which it explicitly names as an alternative.

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

Usage Guidelines5/5

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

Explicitly says to use add_instanced_static_mesh_component + add_ism_instance instead, explains why the substitute is equivalent, and adds the precondition to save work before calling. When-to-use, when-not, and the alternative are all stated.

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