Skip to main content
Glama

fsm_manage

Generate a node-based finite state machine in Godot by creating base State and StateMachine scripts, adding preset or custom states, and attaching the FSM to a target scene node.

Instructions

Finite State Machine (FSM) Management.

Ops: • scaffold_fsm(target_node_path="", name="StateMachine", script_dir="res://scripts/fsm/", preset="enemy_ai", custom_states=[], initial_state="") Scaffold a modular node-based finite state machine architecture with base State class and StateMachine controller. Presets: - 'enemy_ai': Idle, Patrol, Chase, Attack, Hurt, Dead states. - 'character': Idle, Move, Jump, Fall states. - 'custom': Generates scripts for names listed in custom_states. If target_node_path is specified, attaches the StateMachine and child State nodes directly to the target node in the active scene.

Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes
paramsNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.28

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does disclose that files are scaffolded and that nodes are attached when target_node_path is set, which is meaningful. However, it does not mention side effects like potential file overwrites, directory creation, or whether an active scene is required, leaving important behavioral context unclear.

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?

The description is well-organized with a clear op listing, preset breakdown, and a canonical call shape note. It is compact and front-loaded with purpose, though the call-shape paragraph adds a bit of protocol detail that could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The presence of an output schema reduces the need to explain return values, and the description covers the main scaffold behavior and presets. Still, initial_state is left unexplained, side effects are not fully disclosed, and there is no guidance about preconditions such as having an active scene or project context.

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

Parameters4/5

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

The input schema provides only a generic params object with 0% description coverage, so the description must compensate. It documents target_node_path, name, script_dir, preset, custom_states, and initial_state, and explains preset behavior and the effect of target_node_path. It still omits the meaning of initial_state, but it adds substantial parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('scaffold') and resource ('modular node-based finite state machine architecture'), and names concrete presets and outcomes. It does not explicitly contrast itself with sibling management tools, but the domain is unambiguous from the name and content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool by describing FSM scaffolding, but it gives no explicit guidance about when to choose this tool over alternatives, nor does it state prerequisites or exclusions. The conditional behavior about target_node_path is useful but is not usage guidance relative to sibling tools.

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