Skip to main content
Glama

compile_state_transitions

Compile animation state machine transitions in Godot by connecting states with conditions, crossfade durations, and advance modes for controlled state changes.

Instructions

Transition Logic Compiler: Write transition arrow connections between state blocks, attaching evaluation parameters like 'speed > 0.1' or 'is_attacking == true'.

Each transition dict must have:

  • 'from': source state name

  • 'to': destination state name

  • 'condition': optional condition string

  • 'xfade_time': crossfade duration in seconds (default 0.2)

  • 'advance_mode': 0=manual, 1=auto, 2=at_end (default 1)

Args: scene_path: Absolute path to the .tscn scene file. state_machine_resource_id: Sub-resource id of the AnimationNodeStateMachine. transitions: List of transition dicts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
transitionsYes
state_machine_resource_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses meaningful details: required transition dict keys, optional condition, xfade_time default, and advance_mode semantics. However, it does not state whether existing transitions are replaced or appended, what validation occurs, or what side effects writing to the .tscn file has.

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?

The description is scannable and front-loaded, with a clear one-line purpose followed by compact bullet lists for transition fields and arguments. Every sentence adds useful information and there is no filler.

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?

The description is largely sufficient for invoking the tool correctly: it defines all parameters and the nested transition contract. It falls slightly short by not explaining whether the transition list replaces or merges with existing transitions, and by not stating that the state machine must already exist in the scene.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates. It explains each argument: scene_path is an absolute .tscn path, state_machine_resource_id is the sub-resource id, and transitions is a list of dicts with all expected keys, defaults, and value meanings.

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 names the operation ('Write transition arrow connections') and the target resource (AnimationNodeStateMachine via scene_path and state_machine_resource_id). It is specific enough to be distinguished from sibling tools like generate_state_machine, though it does not explicitly state that distinction.

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 explains what the tool does and the required data shape, but it gives no guidance about when to use it versus alternatives. There is no mention of prerequisites such as a previously generated state machine, nor any exclusion such as 'use generate_state_machine to create the machine first'.

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