Skip to main content
Glama

repair_behavior_tree

Repair a corrupted UE5 Behavior Tree asset so it opens in the BT editor. Use non-destructive GUID rescue first to fix invalid NodeGuids, or a destructive rebuild as a last resort.

Instructions

Repair a corrupted Behavior Tree asset so it can be opened in the UE5 BT editor.

Two modes:

• fix_guids_only=True — non-destructive GUID rescue (try this FIRST). Walks every graph node and sub-node, assigning a fresh NodeGuid to any with an invalid (all-zero) one. Tree structure, classes, pins, decorators, services, and runtime properties are all preserved. This is the right choice for BT assets written by pre-BUG-043 plugin builds (their graph nodes have all-zero NodeGuids, which cause the BT editor to crash at 0x68 on open because its internal widget lookups key on NodeGuid).

• fix_guids_only=False (default) — destructive rebuild. Wipes all non-Root graph nodes and saves an empty Root-only BT. Use this ONLY if fix_guids_only=True did not resolve the crash — you will then need build_behavior_tree to repopulate the tree.

Args: behavior_tree_name: Name of the BT asset to repair (e.g. "BT_Enemy_Infantry") fix_guids_only: If True, only fill in missing NodeGuids (non-destructive). Default False (destructive).

Returns: Dict with 'success', 'behavior_tree', 'mode', plus • fix_guids_only: 'guids_fixed', 'guids_already_valid', 'node_count' • destructive: 'node_count_after_repair'

KB: see knowledge_base/04_AI_SYSTEMS.md#overview Example: repair_behavior_tree(behavior_tree_name="ExampleName")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fix_guids_onlyNo
behavior_tree_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it delivers: it clearly distinguishes non-destructive GUID rescue from destructive rebuild, explicitly warns that destructive mode wipes all non-Root nodes, and explains the underlying BUG-043 crash cause. This is far beyond a typical bare description.

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?

The description is detailed but every section earns its place: purpose, two modes, args, returns, KB reference, and example. The bulleted mode breakdown and labeled sections make it scannable, and the purpose is front-loaded. No redundant 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?

Given the tool's destructive capability and the absence of annotations, the description is fully complete: it tells the agent when to use each mode, what each mode does, what the parameters mean, what the return dict contains, and what to do afterward. It even includes an example invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It explains behavior_tree_name with a concrete example, and fix_guids_only with its default value, the exact behavior for each value, and the practical consequences of each mode.

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 action ('Repair a corrupted Behavior Tree asset') and a clear outcome ('so it can be opened in the UE5 BT editor'). The two-mode breakdown further distinguishes the tool from siblings like create_behavior_tree or build_behavior_tree by focusing on repair rather than creation or population.

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 instructs the agent to try fix_guids_only=True FIRST, and to use the destructive mode ONLY if the non-destructive repair did not resolve the crash. It even names the follow-up tool, build_behavior_tree, and points to a KB reference. This leaves no ambiguity about when or how to use the tool.

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