# \[UE 5.8.3\]\[Unreal MCP\] BlueprintTools.set\_pin\_value does not mark Blueprint dirty, causing silent data loss 

**URL:** <https://forums.unrealengine.com/t/ue-5-8-3-unreal-mcp-blueprinttools-set-pin-value-does-not-mark-blueprint-dirty-causing-silent-data-loss/2838948>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine, bug-report\
**Created:** [October 9, 2026, 5:58pm UTC](https://forums.unrealengine.com/t/ue-5-8-3-unreal-mcp-blueprinttools-set-pin-value-does-not-mark-blueprint-dirty-causing-silent-data-loss/2838948 "2026-10-09T17:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fdshad0w](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fdshad0w](https://forums.unrealengine.com/u/Fdshad0w)\
**Post date:** [October 9, 2026, 5:58pm UTC](https://forums.unrealengine.com/t/ue-5-8-3-unreal-mcp-blueprinttools-set-pin-value-does-not-mark-blueprint-dirty-causing-silent-data-loss/2838948/1 "2026-10-09T17:58:50Z")

</div>

### Summary

Unreal Engine 5.8.3’s experimental Unreal MCP tool `BlueprintTools.set_pin_value` successfully changes a Blueprint pin’s default value in memory but fails to mark the owning Blueprint/package as Dirty. As a result, the operation reports success while the modification is silently lost after saving and restarting the Editor.

The root cause was traced to `UBlueprintGraphPinLibrary::SetPinValue`, which calls `Schema->TrySetDefaultValue(*NativePin, Value, false)`, explicitly disabling Blueprint modification tracking.

### What Type of Bug are you experiencing?

AI

### Steps to Reproduce

1. Open Unreal Engine 5.8.3 with the experimental `ModelContextProtocol`, `ToolsetRegistry`, `AllToolsets`, and `EditorToolset` plugins enabled.
2. Create a test Blueprint containing a `ForLoop` macro node with an unconnected `LastIndex` input pin.
3. Save the Blueprint and confirm that it is not marked Dirty.
4. Through Unreal MCP, call `BlueprintTools.set_pin_value` to change the `LastIndex` pin’s default value to `5`.
5. Read the pin value again. The returned value is `5`.
6. Check the Blueprint/package Dirty state. It remains unchanged.
7. Attempt to save the Blueprint using the normal Editor save workflow.
8. Close and restart Unreal Editor, then reopen the Blueprint and inspect `LastIndex`.

### Expected Result

A successful `BlueprintTools.set_pin_value` operation should mark the owning Blueprint/package as modified (Dirty), allowing the updated pin default value to be saved and preserved after restarting Unreal Editor.

The operation should not report a successful persistent edit if the modified Blueprint is not scheduled for saving.

### Observed Result

`BlueprintTools.set_pin_value` returns successfully, and the `ForLoop.LastIndex` value changes to `5` in memory.

However, the Blueprint/package is not marked Dirty. The normal save workflow does not persist the modification. After restarting Unreal Editor, the pin reverts to its original value.

The exact cause was identified in:

`Engine/Source/Editor/BlueprintEditorLibrary/Private/BlueprintEditorLibrary/BlueprintGraphPin.cpp:74`

```cpp
Schema->TrySetDefaultValue(*NativePin, Value, false);

```

The third argument (`bMarkAsModified = false`) prevents `UEdGraphSchema_K2::TrySetDefaultValue` from invoking `FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint)`.

**Suggested minimal fix:**

```cpp
Schema->TrySetDefaultValue(*NativePin, Value, true);

```

This proposed fix has not yet been validated through an engine rebuild.

The existing automated test `test_get_set_pin_value` verifies immediate readback but does not verify Dirty state, saving, or persistence after reopening the Editor.

This bug can cause silent loss of Blueprint changes during AI-assisted development.

### Affects Versions

5.8

### Platform(s)

Windows
