Skip to main content
Glama

set_condition_property

DestructiveIdempotent

Set a property on a StateTree condition node via reflection and save the asset. Edit enter or transition conditions by tree path, state name, and index.

Instructions

Write one property of a condition node on a StateTree state by reflection and save the asset: an enter condition, or a transition condition with target_kind "transition". Only node struct properties are reachable, not instance data. Returns value_changed, new_value and saved; the same value again gives value_changed false.

Returns: { tree_path, state_name, target_kind, transition_index, condition_index, property, set, value_changed, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesNew value as JSON: a number, bool or string, or an object for a struct property, applied through FJsonObjectConverter.
propertyYesName of a property on the condition node struct, e.g. "bInvert" on a compare condition; case-insensitive.
tree_pathYesAsset path of the StateTree, e.g. "/Game/AI/ST_Guard".
state_nameYesName of the state that owns the condition; the command fails without it.
target_kindNoWhich list holds the condition: "state" (default, EnterConditions) or "transition" (Conditions of transition transition_index); any other value means "state".
condition_indexNo0-based index into the selected condition list; omitting it fails as out of range.
transition_indexNo0-based index into the state transitions; used only when target_kind is "transition", where omitting it fails.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.2.0
    • changedInput schema / properties / condition_index / description
      Previous value: -"0-based index into the resolved condition array."New value: +"0-based index into the selected condition list; omitting it fails as out of range."
    • changedInput schema / properties / property / description
      Previous value: -"FProperty name on the condition struct."New value: +"Name of a property on the condition node struct, e.g. \"bInvert\" on a compare condition; case-insensitive."
    • changedInput schema / properties / state_name / description
      Previous value: -"Name of the state."New value: +"Name of the state that owns the condition; the command fails without it."
    • changedInput schema / properties / target_kind / description
      Previous value: -"\"state\" or \"transition\"."New value: +"Which list holds the condition: \"state\" (default, EnterConditions) or \"transition\" (Conditions of transition transition_index); any other value means \"state\"."
    • changedInput schema / properties / transition_index / description
      Previous value: -"Required if target_kind=transition."New value: +"0-based index into the state transitions; used only when target_kind is \"transition\", where omitting it fails."
    • changedInput schema / properties / tree_path / description
      Previous value: -"Asset path."New value: +"Asset path of the StateTree, e.g. \"/Game/AI/ST_Guard\"."
    • addedInput schema / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / value / description
      Previous value: -"JSON value to apply."New value: +"New value as JSON: a number, bool or string, or an object for a struct property, applied through FJsonObjectConverter."
    • removedInput schema / properties / value / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "tree_path",
      -  "property"
      -]New value: +[
      +  "tree_path",
      +  "state_name",
      +  "property",
      +  "value"
      +]
  2. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=true. The description adds value beyond them: it explains the persistence ('save the asset'), the reflection-based write, and clarifies the idempotency contract ('the same value again gives value_changed false'). It doesn't, however, explain why destructive=true or any auth/permission requirement.

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?

Front-loads the core action and keeps the body to two sentences. Minor redundancy: the return fields are previewed inline ('value_changed, new_value and saved') and then repeated in a full 'Returns:' object, which squanders a few words.

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 return contract, which it does fully. It also covers the mutation/persistence and reachability limitations. Nothing critical to correct invocation is missing, though permission requirements are unaddressed.

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 all seven parameters (including the property example 'bInvert' and target_kind values) are already documented in the schema. The description mostly restates the target_kind distinction rather than adding new semantics, so baseline 3 applies.

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?

States a precise verb and resource: 'Write one property of a condition node on a StateTree state'. It even narrows scope to enter vs transition conditions. It does not name the parallel siblings (set_task_property, set_evaluator_property, set_consideration_property), so an agent must infer that this is specifically the condition variant.

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?

Clear context for when the transition form applies ('or a transition condition with target_kind "transition"') and a real limitation ('Only node struct properties are reachable, not instance data'). No explicit when-not or named alternative, but the routing condition is provided.

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