diff --git a/MCPForUnity/Editor/Helpers/GameViewSizeControl.cs b/MCPForUnity/Editor/Helpers/GameViewSizeControl.cs
new file mode 100644
index 000000000..c3f1247f2
--- /dev/null
+++ b/MCPForUnity/Editor/Helpers/GameViewSizeControl.cs
@@ -0,0 +1,335 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
+using UnityEditor;
+using UnityEngine;
+
+namespace MCPForUnity.Editor.Helpers
+{
+ ///
+ /// Fixed Game View presets and observed render-target dimensions. Unity's
+ /// undocumented Editor APIs stay here and fail explicitly if they change.
+ ///
+ internal static class GameViewSizeControl
+ {
+ // Unity clamps fixed presets to at least 10 pixels and Game View render
+ // targets to at most 8192 (also subject to GPU and VRAM limits).
+ internal const int MinDimension = 10;
+ internal const int MaxDimension = 8192;
+ internal const string OwnershipKeyPrefix = "MCPForUnity.GameViewSize.";
+ private const double ReadbackTimeoutSeconds = 5;
+ private static bool _settingSize;
+
+ internal static object Get()
+ {
+ try
+ {
+ var api = new GameViewApi();
+ var view = api.FindView();
+ return new SuccessResponse("Current Game View size. render_size is the allocated render target, not the preset or window size.",
+ api.Read(view));
+ }
+ catch (Exception ex)
+ {
+ return Failure(ex, false);
+ }
+ }
+
+ internal static object Set(ToolParams parameters)
+ {
+ foreach (string name in new[] { "width", "height" })
+ {
+ var token = parameters.GetRaw(name);
+ if (token?.Type != JTokenType.Integer || !parameters.GetInt(name).HasValue
+ || parameters.GetInt(name).Value < MinDimension || parameters.GetInt(name).Value > MaxDimension)
+ return new ErrorResponse($"{name} must be an integer between {MinDimension} and {MaxDimension}.");
+ }
+ if (_settingSize)
+ return new ErrorResponse("game_view_size_busy", new { message = "Another Game View size change is waiting for readback." });
+
+ bool changed = false;
+ try
+ {
+ var api = new GameViewApi();
+ var view = api.FindView();
+ int width = parameters.GetInt("width").Value;
+ int height = parameters.GetInt("height").Value;
+ object groupType = api.CurrentGroupType;
+ _settingSize = true;
+ changed = true;
+ int index = api.SetOwnedPreset(groupType, width, height);
+ api.Select(view, index);
+ return WaitForReadback(api, view, groupType, index, width, height);
+ }
+ catch (Exception ex)
+ {
+ _settingSize = false;
+ return Failure(ex, changed);
+ }
+ }
+
+ /// Wait for Unity to allocate the selected render target without advancing gameplay or taking focus.
+ private static Task