Skip to main content
Glama

set_gameplay_effect_duration

DestructiveIdempotent

Set a GameplayEffect Blueprint's duration policy and, for HasDuration, its duration in seconds. Use to control effect duration in Unreal Engine 5.

Instructions

Set DurationPolicy on the class default object of a GameplayEffect Blueprint and, for HasDuration, a constant DurationMagnitude of duration_seconds (Instant and Infinite leave the stored magnitude as it was), then save the asset without recompiling and without an undo entry. A bad policy, HasDuration without duration_seconds, a non-GE Blueprint, a running PIE session or a read-only root fails before any edit. duration_seconds and duration_readback_ok come back only for HasDuration. For a native GE asset use set_gameplay_effect_duration_policy; for periodic ticks, set_gameplay_effect_period.

Returns: { ge_blueprint_path: string, duration_policy: string, policy_matches: bool, duration_readback_ok: bool, duration_seconds: number, set: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blueprint_nameNoAlias of `ge_blueprint_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `ge_blueprint_path`.
duration_policyYesInstant, Infinite, or HasDuration
duration_secondsNoDuration in seconds; required when duration_policy is HasDuration, ignored for Instant and Infinite
ge_blueprint_pathNoFull asset path of the GE Blueprint

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.2
    • changedInput schema / properties / duration_seconds / description
      Previous value: -"Duration in seconds, written only when duration_policy is HasDuration; ignored for Instant and Infinite, but the schema still requires a number, so pass 0 there"New value: +"Duration in seconds; required when duration_policy is HasDuration, ignored for Instant and Infinite"
    • changedInput schema / required
      Previous value: -[
      -  "duration_policy",
      -  "duration_seconds"
      -]New value: +[
      +  "duration_policy"
      +]
  2. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / duration_seconds / description
      Previous value: -"Required when duration_policy is HasDuration"New value: +"Duration in seconds, written only when duration_policy is HasDuration; ignored for Instant and Infinite, but the schema still requires a number, so pass 0 there"
  3. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly=false, destructive=true and idempotent=true, yet the description adds substantial non-obvious behavior: the asset is saved without recompiling and without an undo entry, Instant/Infinite leave the stored magnitude untouched, and a precise set of pre-edit failure conditions (bad policy, missing duration_seconds for HasDuration, non-GE Blueprint, running PIE, read-only root). It also discloses which fields only appear for HasDuration.

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?

The core action and the failure preconditions are front-loaded, and every clause carries information. It is dense with stacked parentheticals, though, so it is efficient rather than maximally clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description supplies the return shape (ge_blueprint_path, duration_policy, policy_matches, duration_readback_ok, duration_seconds, set), the failure modes, and the state-change semantics. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so the schema already documents each parameter, giving a baseline of 3. The description adds real behavioral meaning on top: that duration_seconds is required only for HasDuration and that Instant/Infinite preserve the prior stored magnitude, which the schema does not convey.

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?

It names a precise verb+resource: setting DurationPolicy on the class default object of a GameplayEffect Blueprint, plus the constant DurationMagnitude for HasDuration. It explicitly distinguishes itself from the two nearest siblings (set_gameplay_effect_duration_policy for native assets, set_gameplay_effect_period for periodic ticks), so an agent can route without opening any schema.

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

Usage Guidelines5/5

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

It states when each alternative applies ('For a native GE asset use set_gameplay_effect_duration_policy; for periodic ticks, set_gameplay_effect_period') and encodes the conditional requirement that duration_seconds is only meaningful for HasDuration. When-to-use and when-to-use-something-else are both explicit.

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