Skip to main content
Glama

scatter_foliage_on_layer

Destructive

Scatter foliage only where a landscape paint layer's weight exceeds a threshold: sample candidate points in a box, place instances on matching areas, and reject the rest.

Instructions

Scatter foliage only where a landscape PAINT LAYER is strong enough: samples seeded candidates in a box, keeps those whose layer weight clears layer_weight_threshold, and rejects the rest -- so trees land on the forest layer and not on rock. The rule-driven sibling of scatter_foliage_in_box. DANGER: it reaches the same FFoliageInfo::AddInstance path that can crash the editor from its two sibling tools, so treat it as unsafe and prefer add_instanced_static_mesh_component + add_ism_instance (query the layer weight yourself) or a PCG graph. Save your work before calling it.

Returns: { applied, requested_count, instances_added, instances_rejected }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for deterministic scatter (default 1337)
countNoNumber of candidate positions to sample (default 16)
centerNoOptional [x,y,z] world center of the scatter box (default 0,0,0)
extentNoOptional [x,y,z] half-extent of the scatter box (default 500,500,0)
layer_nameYesFName of the landscape paint layer (e.g. "Grass", "Forest")
align_to_groundNoWhen true, candidates placed at box-top Z so ground snap is meaningful
foliage_type_pathYesAsset path of the UFoliageType (e.g. /Game/Foliage/BP_Tree)
layer_weight_thresholdNoMinimum layer weight [0,1] for placement (default 0.5)
landscape_name_or_labelYesActor label (or name) of the target ALandscape

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 declare destructiveHint=true and idempotentHint=false, but the description goes further: it warns of an editor crash on the FFoliageInfo::AddInstance path, advises saving work first, and describes the accept/reject behavior plus seed determinism. This is exactly the extra context 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 core mechanism, then a clearly delineated DANGER clause and a Returns breakdown. Dense but each sentence earns its place; the opening clause is slightly long but not padded.

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 9-parameter tool with no output schema, the description covers behavior, failure risk, safer alternatives, and even enumerates the return fields. An agent has everything needed to decide whether and how to call it.

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%, so every parameter is already documented in the schema, establishing the baseline of 3. The description reinforces the interaction between layer_name, layer_weight_threshold, and center/extent (box sampling), but adds no format, range, or default detail beyond the schema.

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 (scatter foliage) and resource (a landscape PAINT LAYER), and immediately clarifies the mechanism: sample candidates in a box, keep those clearing layer_weight_threshold. It explicitly names its sibling scatter_foliage_in_box and distinguishes itself as the 'rule-driven' variant, so an agent can separate them without opening either schema.

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?

Gives explicit when-to-use ('only where a layer is strong enough'), and names concrete alternatives with their selection conditions — add_instanced_static_mesh_component + add_ism_instance (when you can query layer weight yourself) or a PCG graph. Exclusions and the risky-unless-necessary framing 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