Behavior Trees

Validate, convert (behavior3 JSON, BehaviorTree.CPP XML) and open behavior trees in a visual editor

使うべきか

品質と安全性

A
説明の品質
97%
スキーマの完全性
77%
命名の品質
100%
ポイズニングのリスク
100%
権限の一致
100%
プロトコルへの準拠
100%

ツール定義とプロトコルへの準拠に関する自動分析に基づいています。

コンテキストコスト

~1,541トークン数(ツール定義)
~1.6 KB一般的なレスポンスサイズ
注意への影響は中程度(128k コンテキストの 1.20%)

これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。

インストール

ワンクリックインストール

これを `claude_desktop_config.json` ファイルに追加してください:

{
  "mcpServers": {
    "behaviortrees": {
      "command": "npx",
      "args": [
        "behaviortrees"
      ]
    }
  }
}

実行可能なパッケージ

npmbehaviortrees0.2.0stdio

リモートエンドポイント

https://www.behaviortrees.com/mcpstreamable-http

できること

ツール一覧

ツール(6)

🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢validate_tree(tree)

Checks a behavior tree for errors: missing or dangling children, nodes with two parents, cycles, decorators with more than one child, leaves with children, unknown node names, and BehaviorTree.CPP import problems. Returns valid (true when there are no errors), the trees found, and findings at error, warning or info level.

入力スキーマ

{
  "type": "object",
  "properties": {
    "tree": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      ],
      "description": "The tree: behavior3 JSON: {\"title\": \"...\", \"root\": \"<id of the first node under the root>\", \"nodes\": {\"<id>\": {\"name\": \"<node type>\", \"title\": \"<optional label>\", \"children\": [\"<id>\", ...] (composites, in run order) or \"child\": \"<id>\" (decorators), \"properties\": {...}}}, \"custom_nodes\": [{\"name\": \"IsEnemyVisible\", \"category\": \"condition\"}]}. Positions (\"display\") are optional. Any node name that isn't built in (see list_node_types) must be declared in custom_nodes with a category of action, condition, composite or decorator. A whole project ({\"trees\": [...], \"custom_nodes\": [...]}) or BehaviorTree.CPP XML also works."
    }
  },
  "required": [
    "tree"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢create_editor_link(tree)

Returns a url that opens the tree in the behaviortrees.com editor in the user's browser, auto-laid-out and editable, with no account needed. The tree travels inside the link (the URL fragment), so nothing is uploaded or stored. Fails with the validation errors if the tree has any.

入力スキーマ

{
  "type": "object",
  "properties": {
    "tree": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      ],
      "description": "The tree: behavior3 JSON: {\"title\": \"...\", \"root\": \"<id of the first node under the root>\", \"nodes\": {\"<id>\": {\"name\": \"<node type>\", \"title\": \"<optional label>\", \"children\": [\"<id>\", ...] (composites, in run order) or \"child\": \"<id>\" (decorators), \"properties\": {...}}}, \"custom_nodes\": [{\"name\": \"IsEnemyVisible\", \"category\": \"condition\"}]}. Positions (\"display\") are optional. Any node name that isn't built in (see list_node_types) must be declared in custom_nodes with a category of action, condition, composite or decorator. A whole project ({\"trees\": [...], \"custom_nodes\": [...]}) or BehaviorTree.CPP XML also works."
    }
  },
  "required": [
    "tree"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢convert_tree(tree, to)

Convert between behavior3 JSON and BehaviorTree.CPP XML (v4 for ROS 2 Jazzy and Groot2, v3 for ROS 2 Humble), the same way the editor imports and exports. Returns the converted text and any issues (BT.CPP has no equivalent for some behavior3 nodes and vice versa).

入力スキーマ

{
  "type": "object",
  "properties": {
    "tree": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      ],
      "description": "The tree: behavior3 JSON: {\"title\": \"...\", \"root\": \"<id of the first node under the root>\", \"nodes\": {\"<id>\": {\"name\": \"<node type>\", \"title\": \"<optional label>\", \"children\": [\"<id>\", ...] (composites, in run order) or \"child\": \"<id>\" (decorators), \"properties\": {...}}}, \"custom_nodes\": [{\"name\": \"IsEnemyVisible\", \"category\": \"condition\"}]}. Positions (\"display\") are optional. Any node name that isn't built in (see list_node_types) must be declared in custom_nodes with a category of action, condition, composite or decorator. A whole project ({\"trees\": [...], \"custom_nodes\": [...]}) or BehaviorTree.CPP XML also works."
    },
    "to": {
      "type": "string",
      "enum": [
        "behavior3",
        "btcpp-v4",
        "btcpp-v3"
      ],
      "description": "Target format: behavior3, btcpp-v4 or btcpp-v3"
    }
  },
  "required": [
    "tree",
    "to"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢list_node_types

The built-in behavior3 nodes a tree can use without declaring them: composites (Sequence, Priority = selector/fallback, MemSequence, MemPriority), decorators (Inverter, Repeater, MaxTime, ...) and leaves (Wait, Succeeder, Failer, ...), with descriptions and default properties.

入力スキーマ

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢get_example(id)

Complete, working example trees (enemy patrol, cooldown-gated attacks, robot navigation with recovery, and more) to learn the format from or start with. Without an id, lists the examples; with an id, returns that tree as behavior3 JSON.

入力スキーマ

{
  "type": "object",
  "properties": {
    "id": {
      "description": "Example id from the list; omit to list them",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢read_guide(slug)

Practical guides from behaviortrees.com/learn as Markdown: what behavior trees are, node types, blackboards, debugging, structuring large trees, and behavior trees in Unity, Unreal, Godot, Python and robotics (BehaviorTree.CPP, ROS 2, Nav2). Without a slug, lists the guides.

入力スキーマ

{
  "type": "object",
  "properties": {
    "slug": {
      "description": "Guide slug from the list; omit to list them",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

コミュニティ

このサーバーを評価する

エビデンス

最近の観測

検証済みバージョンは記録されていませんツール 6 件