Skip to main content
Glama

add_state_transition

Append a StateTree transition from one state to another (GotoState, OnStateCompleted), then compile and save the asset. Use event_name as RequiredEvent for OnEvent triggers.

Instructions

Append a transition from from_state to to_state on a StateTree asset (trigger OnStateCompleted, type GotoState), then compile and save it; each call adds another one. event_name only fills RequiredEvent, which matters with an OnEvent trigger: set that with set_transition_properties. Returns transition_count and saved.

Returns: { tree_path, from_state, to_state, event_name, transition_count, added, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_stateNoName of the target state the transition goes to.
tree_pathYesAsset path of the StateTree, e.g. "/Game/AI/ST_Guard".
event_nameNoGameplay tag stored as the transition RequiredEvent, e.g. "AI.Event.Alert"; a tag that is not registered is ignored without error.
from_stateNoName of the source state, which owns the new transition.
source_stateNoAlias of `from_state` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `from_state`.
target_stateNoAlias of `to_state` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `to_state`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • changedInput schema / properties / event_name / description
      Previous value: -"Name of the event"New value: +"Gameplay tag stored as the transition RequiredEvent, e.g. \"AI.Event.Alert\"; a tag that is not registered is ignored without error."
    • changedInput schema / properties / from_state / description
      Previous value: -"Source state name"New value: +"Name of the source state, which owns the new transition."
    • changedInput schema / properties / to_state / description
      Previous value: -"Target state name"New value: +"Name of the target state the transition goes to."
    • changedInput schema / properties / tree_path / description
      Previous value: -"Asset path to the UStateTree"New value: +"Asset path of the StateTree, e.g. \"/Game/AI/ST_Guard\"."
  2. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations mark this as non-read-only and non-idempotent, and the description reinforces and extends them by disclosing the compile-and-save side effect and the append-only accumulation ('each call adds another one'). That is real behavioral value beyond the annotation flags, though it omits permission/error characteristics.

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?

Two dense, front-loaded sentences; the return values are stated first as a summary then repeated as a literal object ('Returns transition_count and saved. Returns: {...}'), a small redundancy. With no output schema the return description is warranted, so only the duplication costs it.

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?

For a mutation tool with no output schema and no annotations covering side effects, the description covers the write+compile+save behavior, non-idempotence, the return fields, and the event_name caveat. Only an explicit note on failure modes/permissions is missing to make it fully complete.

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?

Schema description coverage is 100%, so baseline is 3, but the description adds meaning beyond it: event_name 'only fills RequiredEvent' and only matters with an OnEvent trigger. This clarifies a semantic distinction the schema itself does not draw, warranting a point above baseline.

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 precise verb+resource+scope: 'Append a transition from from_state to to_state on a StateTree asset (trigger OnStateCompleted, type GotoState)'. It also names the sibling that complements it ('set that with set_transition_properties'), so an agent can separate it from update_transition/remove_transition without opening 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?

Gives clear context ('each call adds another one', so use once per transition) and explicitly routes the OnEvent trigger configuration to set_transition_properties. It stops short of stating when NOT to use it (e.g. that it only appends and cannot modify an existing transition), so it is strong but not exhaustive.

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