Skip to main content
Glama

add_state_tree_global_task

Attach a global task node to a UStateTree by struct name, making it run for the tree's entire lifetime.

Instructions

Attach a global task node (by struct name, via reflection) to a UStateTree; global tasks run for the whole tree's lifetime.

Returns: { tree_path, task_struct, global_task_count, added, saved }

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the mutation profile is already known. The description adds the global-task lifetime semantics and a returns breakdown ({ added, saved }), which is genuinely useful context, but it omits error behavior (e.g., what happens if the struct does not derive from StateTreeTaskBase) and whether compilation follows.

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 sentences with the core purpose front-loaded and the return shape appended; nothing is wasted. Slightly terse, but every clause earns its place.

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 2-param mutation tool with full schema coverage and annotations, the description is nearly complete, and it compensates for the missing output schema by listing the returned fields. It only lacks failure-mode and post-mutation (compile/save) detail.

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 the schema already documents tree_path and task_struct. The description adds the useful 'by struct name, via reflection' framing for task_struct but no syntax or format details beyond the schema. Baseline 3 is appropriate.

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 specific verb (attach) plus resource (global task node to a UStateTree), the mechanism (by struct name, via reflection), and the semantic distinction that global tasks run for the whole tree's lifetime. This separates it cleanly from add_state_task and add_state_tree_global_task_property without needing the schema.

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?

The lifetime semantics ('run for the whole tree's lifetime') imply when a global task is appropriate versus a per-state task, but the description never explicitly names the alternatives or states a when-not condition. Usage is inferable but not spelled out.

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