Skip to main content
Glama

set_viewmodel_field

DestructiveIdempotent

Instantiates a UMVVM view model class on a UUserWidget and sets it via SetViewModelByClass to enable MVVM data binding.

Instructions

Instantiate a UMVVMViewModelBase on a UUserWidget instance and set it via UMVVMBlueprintLibrary::SetViewModelByClass.

Returns: { widget_instance_name, view_model_class, context_name, set, instance_class }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYesFName of the target context on the widget
view_model_classYesVM class: asset path or /Script/<Module>.<ClassName>
widget_instance_nameYesLabel (Actor label or asset path) used to find an in-world UUserWidget

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds value by naming the exact API (SetViewModelByClass) and enumerating the response fields in the absence of an output schema, but it never says whether an existing viewmodel is replaced or what conditions cause failure.

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 front-loaded sentences with no filler; the return-shape clause is compact. Slightly terse for a mutation that replaces widget state, but nothing is wasted.

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

Completeness3/5

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

For a mutation tool with no output schema, the inline return-field list is a real contribution, and annotations cover the safety hints. Still missing the setup precondition (context/viewmodel registration) and the consequence of replacing an existing viewmodel on the widget.

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 all three parameters are documented there, so the schema carries the load. The description adds no syntax or format detail beyond restating the parameter names in the return list.

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 ('Instantiate a UMVVMViewModelBase on a UUserWidget instance and set it') plus the underlying API call, so the operation is unambiguous. However, there is no differentiation from close siblings like add_viewmodel, bind_widget_to_viewmodel, or remove_viewmodel, and the tool name's 'field' wording is never explained by the description.

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

Usage Guidelines2/5

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

No guidance on when to use this instead of add_viewmodel or bind_widget_to_viewmodel, nor any prerequisites (e.g. whether a context must already exist via add_viewmodel). The agent must infer routing from the name alone.

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