Skip to main content
Glama

scatter_foliage_in_box

Destructive

Scatter N foliage instances randomly within a world-space box, using a seed for repeatable layouts. Warning: crashes the editor; prefer add_instanced_static_mesh_component.

Instructions

Scatter N seeded-random foliage instances of a type inside a world-space box (same seed = same layout). DANGER: measured CRASHING the editor process, the identical access violation as add_foliage_instances (UnrealEditor-FoliageEdit.dll) because both end in the same FFoliageInfo::AddInstance path -- lowering count does not help and the failure arrives disguised as "Connection reset". Use add_instanced_static_mesh_component + add_ism_instance to scatter instead, or PCG for rule-driven placement. Save your work before calling this at all.

Returns: { foliage_type_path: string, foliage_type: string, requested: int, seed: int, align_to_ground: bool, instances_added: int, instance_count_before: int, total_instance_count: int, placed_instance_count: int, instances_added_ok: bool, center: [number], extent: [number], foliage_actor: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoSeed for the random stream, default 1337
countYesNumber of instances to scatter, default 8
centerNo[x, y, z] box center in world space, default [0,0,0]
extentNo[x, y, z] box half-extents, default [500,500,0]
align_to_groundNoIf true, place at the box top instead of random Z
foliage_type_pathYesFull path of the UFoliageType asset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes far beyond the destructiveHint=true annotation by disclosing a measured, reproducible crash, the exact access violation (UnrealEditor-FoliageEdit.dll), the shared FFoliageInfo::AddInstance root cause with add_foliage_instances, the counterintuitive fact that lowering count does not help, and the disguising 'Connection reset' symptom. This is exactly the behavioral context annotations cannot carry.

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?

Front-loaded with purpose and determinism, then the DANGER block, then concrete alternatives, then the return shape. Every sentence carries a distinct obligation (behavior, warning, fallback, return contract) with no filler.

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?

No output schema exists, and the description compensates by enumerating the full return object (foliage_type_path, requested, seed, instances_added, ok flag, counts, center/extent, actor). Combined with the crash warning and fallbacks, an agent has everything needed to decide and call safely.

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 coverage is 100%, so the schema already documents all six params; baseline would be 3. The description still adds meaning beyond the schema: seed semantics ('same seed = same layout') and the world-space box interpretation of center/extent, which clarify how count and seed jointly determine output.

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 precise verb+resource: scatter N seeded-random foliage instances of a given type inside a world-space box, and adds the determinism guarantee (same seed = same layout). It is immediately distinguishable from nearby siblings like add_foliage_instances, scatter_foliage_on_layer, and add_ism_instance.

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 tells the agent when NOT to use it and what to use instead: 'Use add_instanced_static_mesh_component + add_ism_instance to scatter instead, or PCG for rule-driven placement,' plus a precondition ('Save your work before calling this at all'). Both the alternative tools and the condition selecting them are named.

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