Skip to main content
Glama

add_bt_service

Idempotent

Attach a background tick service to a BehaviorTree composite node in Unreal Engine so it runs only while that branch is active. Idempotent by service name within the composite.

Instructions

Attach a service (background tick) to a BehaviorTree composite. The service is appended to the composite's Services array and ticks while that composite branch is active. Authoring is data-only: ParentNode/ExecutionIndex are assigned by the BT runtime at load (run_behavior_tree). Idempotent by service_name within the composite.

Returns: { behavior_tree_path: string, parent_name: string, service_name: string, service_class: string, already_exists: bool, service_count: int, saved: bool, save_error?: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_nameNoOptional composite name to attach the service to; "Root" or omitted targets the RootNode.
service_nameNoOptional stable name for the new service (its identity for idempotency); defaults to the service type.
service_classYesConcrete service class: "DefaultFocus" | "RunEQS" | ... (or a BTService_* class name).
behavior_tree_pathYesPath to the UBehaviorTree asset (its RootNode must already be set via set_behavior_tree_root).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the service is appended to the Services array, ticks when its branch is active, that ParentNode/ExecutionIndex are runtime-assigned rather than authored, and that idempotency is keyed on service_name within the composite. It also enumerates the return shape including the save_error field, which no output schema provides.

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?

Front-loads the actor/verb/resource, then the behavioral mechanics, then the return shape. Every clause is load-bearing - the runtime-assignment note and the idempotency scope both head off likely agent mistakes.

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?

With no output schema, the description correctly compensates by enumerating the return fields, and it explains the runtime assignment caveat for a mutation tool whose annotations only cover safety hints. An agent has everything needed 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 the schema already documents all four parameters. The description reinforces service_name's idempotency role but mostly restates what the schema already states, so it lands at the baseline rather than adding new meaning.

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 (BT service) plus its exact scope - appended to a named composite's Services array. This distinguishes it from siblings like add_bt_decorator, add_bt_composite_child, and add_bt_task_child without needing their schemas.

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?

Explains the semantics of what it attaches and that it ticks only while the composite branch is active, and notes it is data-only authoring (assigned at load by run_behavior_tree). It clarifies context well but never explicitly names an alternative or an exclusion, leaving sibling selection to inference from tool names.

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