Skip to main content
Glama

add_state_task

Attach a task node to a state's Tasks list in a UStateTree by resolving its struct name via reflection, then save the asset.

Instructions

Attach a task node (by struct name, resolved via reflection) to a state's Tasks list on a UStateTree.

Returns: { tree_path, state_name, task_struct, task_count, added, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tree_pathYesAsset path to the UStateTree
state_nameYesName of the state to add the task to
task_structYesTask struct name or /Script path; must derive from StateTreeTaskBase (e.g. "StateTreeDebugTextTask")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedInput schema / required
      Previous value: -[
      -  "tree_path",
      -  "task_struct"
      -]New value: +[
      +  "tree_path",
      +  "state_name",
      +  "task_struct"
      +]
  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 the mutation/safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds genuinely new behavioral context: struct resolution happens via reflection, and the returned `saved` field reveals the asset is persisted to disk after the edit.

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?

Two tight sentences: the action is front-loaded and the return shape is compactly enumerated. No filler, every clause carries information.

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?

Only 3 required, fully documented params and no output schema, so the description's inline return-value listing is a real aid. It is nearly complete, missing only the precondition that the target state/tree must already exist.

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 the baseline is 3. The description adds meaning beyond the schema by explaining that the task_struct argument is resolved via reflection and that it lands in the state's Tasks list, clarifying how task_struct is actually consumed.

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 specific verb and resource: attach a task node to a state's Tasks list on a UStateTree. The phrase "state's Tasks list" inherently separates it from the global-task sibling, but it never names an alternative, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied by the description (you call this to add a task to an existing state), but there is no explicit when-to-use, when-not-to-use, or alternative routing. No prerequisites (e.g. the state must already exist) are stated.

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