Skip to main content
Glama

set_state_tree_root

DestructiveIdempotent

Set a top-level state as the root of a StateTree asset by moving it to the first SubTree slot, then compile and save; nested states are refused, returning root_state with set and saved, or already_root.

Instructions

Make a top-level state the root of a StateTree asset by moving it to the first SubTree slot, then compile and save it. A nested state is refused. Returns root_state with set and saved, or already_root when it was already first (nothing saved).

Returns: { tree_path, root_state, already_root, set, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tree_pathYesAsset path of the StateTree, e.g. "/Game/AI/ST_Guard".
root_state_nameYesName of a top-level state, such as one made by add_state; a state nested under another is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / root_state_name / description
      Previous value: -"Name of the state to make root"New value: +"Name of a top-level state, such as one made by add_state; a state nested under another is refused."
    • changedInput schema / properties / tree_path / description
      Previous value: -"Asset path to the UStateTree"New value: +"Asset path of the StateTree, e.g. \"/Game/AI/ST_Guard\"."
  2. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, and the description adds substantial beyond that: the state is relocated to the first SubTree slot, compilation and saving are triggered as side effects, and the already_root no-op path is spelled out ('nothing saved').

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 action and the refusal rule, and appropriately short. The trailing 'Returns: { ... }' list partially repeats the return sentence that came just before it, a minor redundancy.

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 mutation tool with no output schema, the description covers the operation, the side effects (compile + save), the rejection case, and the possible return states, which is everything an agent needs 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%, so both tree_path and root_state_name are already documented with examples in the schema. The description reinforces the top-level constraint but adds little syntactic meaning beyond what the schema states.

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 states a precise verb+resource ('Make a top-level state the root of a StateTree asset') and explains the mechanism (move to the first SubTree slot, then compile and save). It distinguishes this from unrelated sibling tools like add_state or set_state_type without ambiguity.

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?

It gives a clear when-not rule ('A nested state is refused') and states that it compiles/saves, which is useful context before invoking. It does not name a sibling alternative for cases where the caller wants nested states promoted, but the selection condition is otherwise clear.

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