Skip to main content
Glama

set_behavior_tree_root

DestructiveIdempotent

Assign a new Selector or Sequence composite as a BehaviorTree's RootNode and save the asset. This lets you restructure AI behavior trees in Unreal Engine.

Instructions

Set a BehaviorTree's RootNode to a new composite (Selector or Sequence) and save.

Returns: { behavior_tree_path: string, composite: string, has_root_node: bool, root_node_class: string, saved: bool, save_error: string? }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compositeNoRoot composite type: "Selector" or "Sequence" (optional, default "Selector")
behavior_tree_pathYesPath to the UBehaviorTree asset.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds genuinely new behavioral context: the operation persists to disk ('and save') and reports save outcomes via saved/save_error. This surfaces failure modes that the annotations cannot express, though it stops short of stating that the previous root is discarded.

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 action is front-loaded in the first sentence and the return contract is set off cleanly. The return-type block is slightly dense but earns its place because no output schema exists to convey it.

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

Completeness4/5

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

With no output schema, the description carries the return value, listing each field including the optional save_error, which is exactly the missing piece. Combined with annotations covering the safety profile and a fully covered schema, only the destructive replacement of an existing root is left implicit.

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 coverage is 100% and both parameters are fully documented in the schema, including the 'Selector'/'Sequence' options and the default. The description names the composite types but adds no syntax or meaning beyond what the schema already provides, so the baseline 3 is correct.

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 specific verb ('Set'), resource ('a BehaviorTree's RootNode'), and the target value ('a new composite (Selector or Sequence)'), plus the side effect ('and save'). An agent can distinguish this from siblings like add_bt_composite_child (adds a child) or set_state_tree_root (a different system) 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 Guidelines3/5

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

Usage is implied by 'set ... to a new composite' and the schema's default of 'Selector', but there is no explicit when-to-use/when-not guidance and no named alternative such as set_state_tree_root. For a straightforward setter this is adequate, but an agent gets no routing help.

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