Skip to main content
Glama

add_widget_property_binding

Destructive

Bind a widget property to a pure, parameterless function on its Widget Blueprint so the value recomputes each frame, replacing any existing binding.

Instructions

Bind a widget PROPERTY to a function of the Widget Blueprint -- the Designer's "Bind" dropdown, headless. The property then recomputes every frame from that function instead of holding a fixed value (a health bar's Percent, a label's Text, a panel's Visibility). TWO RULES, both enforced by the ENGINE'S OWN validator (FDelegateEditorBinding::IsBindingValid, the same code the UMG compiler runs -- this tool does not second-guess it): the property is bindable only if its widget declares a companion delegate named "Delegate" (Text -> TextDelegate), and the function must have a COMPATIBLE SIGNATURE (same return type, NO parameters) and be PURE (BlueprintPure or const), because it is called while painting. A refusal names which of the two failed and, when the property is not bindable at all, lists the ones that are. Create the function first with add_blueprint_function + set its return type; one property can hold only ONE binding, so re-binding the same property REPLACES it (reported in replaced_existing).

Returns: { widget_bp_path: string, widget_name: string, property_name: string, function_name: string, bound: bool, valid: bool, replaced_existing: bool, member_guid: string, validation_messages: [string], bindable_properties?: [string], saved: bool, save_error: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNoCompile + save the Widget Blueprint when done (default true). The compile is what turns the editor binding into the runtime one, so a false here leaves the binding authored but not live.
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
widget_nameYesName of the widget in the tree whose property gets bound (must be a direct variable of the UserWidget)
function_nameYesName of the function ON THIS Widget Blueprint that supplies the value. Must be pure and take no parameters, returning the property's type.
property_nameYesProperty to bind, e.g. "Text" on a TextBlock, "Percent" on a ProgressBar, "Visibility" on any widget. Must have a companion "<property_name>Delegate" on the widget's class.
blueprint_nameNoAlias of `widget_bp_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `widget_bp_path`.
widget_bp_pathNo/Game path of the Widget Blueprint asset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint/readOnlyHint/idempotentHint): it discloses that re-binding REPLACES an existing binding, that the engine's own validator (not this tool) decides validity, that refusals name which rule failed and list bindable properties, and that save=true is what makes the binding live. These are exactly the mutation and failure-mode details an agent needs.

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 purpose and the two enforced rules, and the trailing Returns block is justified because no output schema exists. It is dense rather than padded, though the namedropping of the internal validator class (FDelegateEditorBinding::IsBindingValid) and 'does not second-guess it' is more detail than the caller strictly needs.

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?

For a 7-parameter mutation with no output schema, the description covers the prerequisites, the two validation rules, the replacement semantics, the PIE hazard, the save/compile consequence, and a full return-shape listing — 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the per-parameter descriptions already carry the purity/signature/delegate requirements, so the description's similar content is largely redundant. It adds only the one-binding-per-property replacement rule, which is more behavioral than parameter-level, so the 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 precise verb+resource ('Bind a widget PROPERTY to a function') and squarely contrasts it with the static alternative ('instead of holding a fixed value'), effectively distinguishing it from siblings like set_widget_property. The 'Designer's Bind dropdown, headless' framing pins the exact editor operation an agent is invoking.

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 a concrete prerequisite ('Create the function first with add_blueprint_function + set its return type') and states the replacement rule for re-binding. It implies the dynamic-vs-static use case but never names a sibling alternative or an explicit 'when not to use' beyond the PIE refusal.

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