Skip to main content
Glama

load_behavior

Destructive

Load, unload, or hot-swap a behavior tree instance in the browser runtime to execute active trees, returning execution handle and runtime state.

Instructions

Load, unload, or hot-swap a behavior tree instance in the browser runtime (actions: load, unload, swap). Use load_behavior instead of manage_behaviors when executing an active behavior tree instance at runtime rather than registering or inspecting definitions.

Returns execution handle, runtime state, active node, and session/intention bindings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesBehavior loading operation: load, unload, swap
projectNoTarget project slug
trace_idNoDistributed trace ID for cross-server correlation
parametersNoInitial execution parameters
session_idNoLinked state-memory session ID
intention_idNoLinked agent-reasoning intention ID
behavior_nameYesName of the behavior tree to load
behavior_versionNoVersion of behavior tree (defaults to latest)
client_request_idNoIdempotency key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / action / description
      Previous value: -"Behavior loading operation"New value: +"Behavior loading operation: load, unload, swap"
    • addedInput schema / properties / action / enum
      Added value: +[
      +  "load",
      +  "unload",
      +  "swap"
      +]
  2. Changed14 schema fields changedv0.2.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / action / description
      Added value: +"Behavior loading operation"
    • removedInput schema / properties / action / enum
      Removed value: -[
      -  "load",
      -  "unload",
      -  "swap"
      -]
    • addedInput schema / properties / behavior_name / description
      Added value: +"Name of the behavior tree to load"
    • addedInput schema / properties / behavior_version / description
      Added value: +"Version of behavior tree (defaults to latest)"
    • addedInput schema / properties / client_request_id / description
      Added value: +"Idempotency key"
    • addedInput schema / properties / intention_id / description
      Added value: +"Linked agent-reasoning intention ID"
    • removedInput schema / properties / parameters / additionalProperties
      Removed value: -true
    • addedInput schema / properties / parameters / description
      Added value: +"Initial execution parameters"
    • removedInput schema / properties / parameters / properties
      Removed value: -{}
    • addedInput schema / properties / project / description
      Added value: +"Target project slug"
    • addedInput schema / properties / session_id / description
      Added value: +"Linked state-memory session ID"
    • addedInput schema / properties / trace_id / description
      Added value: +"Distributed trace ID for cross-server correlation"
  3. First observedv0.1.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered structurally. The description usefully adds what the call returns (handle, runtime state, active node, session/intention bindings) and the hot-swap semantics, but it never explains what unload or swap destroys or what happens to an in-flight tree, which is the key behavioral gap for a destructive tool.

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?

Two sentences, front-loaded with the operation and its action modes, followed by the sibling-disambiguation rule and the return summary. No padding or repetition of the name.

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 burden of describing returns, which it does compactly, and it routes between sibling tools. The remaining gap is the unaddressed destructive side of unload/swap, which matters for a nine-parameter mutation tool.

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 every parameter is already documented in the schema, establishing a baseline of 3. The description adds no syntax or format detail beyond naming the actions and the return fields, so it does not raise the score.

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 set (load, unload, hot-swap) on a concrete resource (a behavior tree instance in the browser runtime) and enumerates the three action modes. It also explicitly contrasts itself with the sibling manage_behaviors, so an agent can distinguish the two without opening either schema.

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?

Gives an explicit when-to-use rule: use load_behavior rather than manage_behaviors when executing an active behavior tree instance at runtime instead of registering or inspecting definitions. The alternative and the selecting condition are both named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.