Skip to main content
Glama

create_state_tree

Create or load a StateTree asset, add missing schema and root state, then compile and save. Use for AI behavior trees in Unreal Engine.

Instructions

Create a StateTree asset at package_path/tree_name (or load the one already there), giving it any missing editor data, the plugin UMCPStateTreeSchema when it has no schema and a Root state when it has no states, then compile and save it. Returns tree_path, state_count, created and saved.

Returns: { tree_path, tree_name, state_count, created, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tree_nameYesAsset name without path, e.g. "ST_Guard"; an asset of another class with that name is an error.
package_pathNoContent folder for the asset, e.g. "/Game/AI" (default /Game/MCP).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / package_path / description
      Previous value: -"Target content package path where the asset is created (default /Game/MCP)"New value: +"Content folder for the asset, e.g. \"/Game/AI\" (default /Game/MCP)."
    • changedInput schema / properties / tree_name / description
      Previous value: -"Name of the UStateTree asset"New value: +"Asset name without path, e.g. \"ST_Guard\"; an asset of another class with that name is an error."
  2. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly=false, destructive=false), and the description adds real substance beyond them: it repairs missing editor data, injects the UMCPStateTreeSchema when absent, adds a Root state, then compiles and saves. Worth noting the 'load the one already there' wording reads idempotent while idempotentHint=false, though the underlying mutations (compile/save) explain the annotation.

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 core behavior is front-loaded in one dense but readable sentence. The trailing 'Returns:' line largely restates the return fields already named in the first sentence, a minor redundancy, but nothing else is wasted.

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?

There is no output schema, and the description compensates by enumerating the return fields (tree_path, tree_name, state_count, created, saved). Combined with the full behavioral walkthrough, an agent has everything needed to invoke and interpret the result.

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 the schema already documents both parameters, giving a baseline of 3. The description adds only the composition rule (package_path/tree_name) and the load-if-present behavior, without new format or constraint detail.

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 (create) and resource (StateTree asset) with exact path semantics (package_path/tree_name) and even covers the load-if-exists case. An agent can distinguish this from siblings like list_state_trees, delete_state_tree, and compile_state_tree without opening any schema.

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 clearly communicates the create-or-load behavior and the side effects (adds editor data, schema, Root state, compiles, saves), which tells an agent when this tool is the right call. It does not, however, explicitly name an alternative (e.g. compile_state_tree) or state when NOT to use it.

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