Unreal MCP (ModelContextProtocol): ObjectTools.set_properties on UInputMappingContext.Mappings silently fails to persist; get_properties returns phantom values

Summary

Engine version: 5.8.0 (CL 55116800), Windows
Plugins: ModelContextProtocol (Experimental), EditorToolset / ToolsetRegistry

Writing the Mappings array of a UInputMappingContext through the MCP editor_toolset.toolsets.object.ObjectTools.set_properties tool reports success and marks the asset dirty, but the mappings are never written to the real asset. The IMC editor shows an empty Mappings list and at runtime AddMappingContext applies nothing (showdebug enhancedinput → “No enhanced player input action mappings have been applied”). Critically, get_properties reads the values back as if set, so the round-trip falsely appears to succeed.

Likely cause

The reflection-based setter can’t construct/serialize an array of FEnhancedActionKeyMapping (which contains an FKey plus instanced UInputTrigger / UInputModifier sub-objects), and/or it skips the PostEditChangeProperty that UInputMappingContext::MapKey performs. get_properties appears to read a transient per-instance override rather than the serialized array.

Impact

Agents driving the editor over MCP cannot author Enhanced Input mappings. The silent success + misleading get_properties readback makes it extremely hard to diagnose.

Workaround

Author IMC key mappings in the editor. Only the IMC Mappings array is affected — creating the IA/IMC assets and assigning references work fine.

What Type of Bug are you experiencing?

AI

Steps to Reproduce

  1. DataAssetTools.create a UInputAction (IA_Jump) and a UInputMappingContext (IMC_Test).
  2. ObjectTools.set_properties on IMC_Test with values = {"Mappings":[{"action":"/Game/.../IA_Jump.IA_Jump","key":"SpaceBar"}]} → returns true.
  3. ObjectTools.get_properties ["Mappings"] → returns the Space→IA_Jump mapping (looks set).
  4. AssetTools.is_dirtytrue; AssetTools.save_assets → afterward is_dirtyfalse (i.e. it saved).
  5. Open IMC_Test in the editor → Mappings list is empty.
  6. Assign the IMC to a possessed pawn and showdebug enhancedinput in PIE → “No enhanced player input action mappings have been applied.”

Expected Result

set_properties writes the mappings to the real serialized property so they persist and apply at runtime, matching editor-authored mappings.

Observed Result

The write never reaches the real Mappings; get_properties reports a phantom/staged copy; the saved asset and runtime have zero mappings.

Affects Versions

5.8

Platform(s)

Windows