Skip to main content
Glama

add_bt_decorator

Idempotent

Attach an execution condition (decorator) to a BehaviorTree child edge so the runtime can gate whether that child runs; duplicate names are ignored.

Instructions

Attach a decorator (execution condition) to a specific child-edge of a BehaviorTree composite. The decorator is appended to that child's Decorators array and gates whether the child may run. Authoring is data-only: ParentNode/ExecutionIndex are assigned by the BT runtime at load (run_behavior_tree). Idempotent by decorator_name within the child-edge.

Returns: { behavior_tree_path: string, parent_name: string, child_name: string, decorator_name: string, decorator_class: string, already_exists: bool, decorator_count: int, saved: bool, save_error?: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
child_nameYesName of the existing child (a child_name from a prior add_bt_task_child/add_bt_composite_child) whose edge the decorator gates.
parent_nameNoOptional parent composite name owning the child-edge; "Root" or omitted targets the RootNode.
decorator_nameNoOptional stable name for the new decorator (its identity for idempotency); defaults to the decorator type.
decorator_classYesConcrete decorator class: "Cooldown" | "Loop" | "TimeLimit" | "Blackboard" | ... (or a BTDecorator_* class name).
behavior_tree_pathYesPath to the UBehaviorTree asset (its RootNode must already be set, with the target child added).

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?

Goes well beyond the annotations by disclosing that authoring is data-only, that ParentNode/ExecutionIndex are assigned by the runtime at load rather than by this call, that the decorator gates whether the child runs, and precisely scopes idempotency ('by decorator_name within the child-edge'). The idempotentHint annotation is restated but refined with the exact key, adding real value.

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?

Three tight sentences front-load the purpose, then qualify behavior and idempotency. The appended Returns block is justified because no output schema exists. Only minor redundancy between the description and annotations on idempotency.

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?

For an authoring/mutation tool with no output schema, the definition supplies the return shape inline and covers the key facts (data-only write, runtime-assigned fields, idempotency, gating semantics). Permission/auth requirements are not addressed, but nothing essential for correct invocation is missing.

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%, so the schema already documents all five parameters including enums and defaults. The description adds context for why no ParentNode/ExecutionIndex params exist (runtime-assigned) and echoes decorator_name semantics, but adds little syntactic meaning beyond the schema. Baseline 3 is appropriate.

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 (attach) and resource (a decorator/execution condition) applied to a precisely scoped target (a specific child-edge of a BehaviorTree composite). This clearly distinguishes it from sibling authoring tools like add_bt_composite_child, add_bt_task_child, and remove_bt_decorator.

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?

The scope ('a specific child-edge' of a composite, targeting a child from a prior add) implies usage context but never explicitly states when to choose this versus alternatives or lists prerequisites. The mention that ParentNode/ExecutionIndex are resolved by run_behavior_tree hints at a workflow but stops short of routing guidance.

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