Skip to content

Conversation

@msanatan
Copy link
Contributor

@msanatan msanatan commented Nov 28, 2025

Also fix manage_editor and add another action for manage_gameobject. We also standardize the whitespace after warnings from Unity's validator.

Closes #379

Summary by CodeRabbit

  • Bug Fixes

    • Improved cache-clearing failure messaging with clearer combined output and hints for retrying when resources are in use.
  • New Features

    • Added support for retrieving component information via a new get_component action.
  • Changes

    • Reduced and focused editor management actions to a smaller core set.
    • Prefab workflow actions revised to explicit stage and create-from-object operations; related parameters simplified.

✏️ Tip: You can customize this high-level summary in your review settings.

The whitespace gave a warning in the asset store submission
…d output

Replace simple stderr-only error reporting with combined stdout/stderr output. Add detection for "currently in-use" lock errors with helpful hint about waiting or using --force flag. Provide fallback message when command fails with no output.
@msanatan msanatan self-assigned this Nov 28, 2025
@msanatan
Copy link
Contributor Author

@coderabbitai let's go!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

@msanatan: Let's do this! I'll review the changes in this PR right away. 🚀

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

Walkthrough

Reorganizes using directives across many C# files and updates Python server tool signatures: narrows allowed actions for manage_editor, adds get_component to manage_gameobject, and replaces manage_prefabs actions with prefab-stage operations while removing component_properties.

Changes

Cohort / File(s) Summary
C# import reorganization
MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs, MCPForUnity/Editor/Helpers/CodexConfigHelper.cs, MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs, MCPForUnity/Editor/Helpers/ExecPath.cs, MCPForUnity/Editor/Helpers/GameObjectSerializer.cs, MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs, MCPForUnity/Editor/Helpers/McpLog.cs, MCPForUnity/Editor/Helpers/PortManager.cs, MCPForUnity/Editor/Helpers/Response.cs, MCPForUnity/Editor/Helpers/TelemetryHelper.cs, MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs, MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs, MCPForUnity/Editor/Resources/Tests/GetTests.cs, MCPForUnity/Editor/Services/BridgeControlService.cs, MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs, MCPForUnity/Editor/Services/PackageUpdateService.cs, MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs, MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs, MCPForUnity/Editor/Setup/SetupWindowService.cs, MCPForUnity/Editor/Tools/ManageEditor.cs, MCPForUnity/Editor/Tools/ManageGameObject.cs, MCPForUnity/Editor/Tools/ManageScene.cs, MCPForUnity/Editor/Tools/ManageShader.cs, MCPForUnity/Editor/Tools/ReadConsole.cs, MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs, MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs, MCPForUnity/Editor/Windows/MCPSetupWindow.cs
Reorders, consolidates and deduplicates using directives; adds or moves a few imports (e.g., MCPForUnity.Editor.Constants, MCPForUnity.Editor.Config); minor whitespace formatting. No behavioral changes.
Server: manage_editor signature
Server/src/services/tools/manage_editor.py
Narrows the allowed action literal set from many editor query actions to a focused set: telemetry_status, telemetry_ping, play, pause, stop, set_active_tool, add_tag, remove_tag, add_layer, remove_layer.
Server: manage_gameobject extension
Server/src/services/tools/manage_gameobject.py
Adds "get_component" to the allowed action literal values.
Server: manage_prefabs stage API
Server/src/services/tools/manage_prefabs.py
Replaces action literals (create, modify, delete, get_components) with stage-focused actions (open_stage, close_stage, save_open_stage, create_from_gameobject), removes component_properties parameter, and updates decorator description metadata.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus on:
    • Server/src/services/tools/manage_prefabs.py: confirm client/server action set alignment (issue #379) and update any clients expecting the removed literals or component_properties.
    • Server/src/services/tools/manage_editor.py: ensure the narrowed action set is intentional and that clients no longer require the removed query actions.
    • Server/src/services/tools/manage_gameobject.py: verify handling for the new get_component action is implemented downstream.
    • Spot-check several C# files after using reorganization to ensure no missing references or accidental duplicates remain.

Possibly related PRs

Suggested reviewers

  • justinpbarnett
  • dsarno
  • Scriptwonder

"I hopped through imports, tidy and spry,
I trimmed the actions that once ran awry,
Added a component call neat and small,
Prefab stages now answer the call —
🐇✨ code hopping, ready to try!"

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes involve using directive reordering and whitespace standardization across 25+ files, which are out of scope for the stated objective of fixing manage_prefabs schema mismatch. Remove or isolate the using directive reordering and whitespace changes into a separate PR focused on code organization; keep this PR focused on the schema fixes.
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fix manage prefabs' is vague and generic, failing to convey the specific changes made (schema reconciliation, whitespace standardization, manage_editor fixes, manage_gameobject additions). Consider a more descriptive title like 'Reconcile manage prefabs schema and standardize using directives' to better reflect the primary changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully reconciles the client/server schema mismatch for manage_prefabs [#379], updates manage_editor actions, and adds manage_gameobject capability, addressing all coding objectives.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
MCPForUnity/Editor/Services/ServerManagementService.cs (1)

44-59: Error diagnostics are improved; consider clearer separation for the lock hint.

The combined stdout/stderr handling and the specific lock hint based on "currently in-use" are solid improvements and should make failures much easier to diagnose. The only polish I’d suggest is to visually separate the hint from the main details text so it reads more clearly in logs.

You can keep the same behavior but make the formatting a bit clearer, e.g.:

-                McpLog.Error($"Failed to clear uv cache using '{uvCommand} {args}'. Details: {combinedOutput} {(string.IsNullOrEmpty(lockHint) ? string.Empty : lockHint)}");
+                McpLog.Error(
+                    $"Failed to clear uv cache using '{uvCommand} {args}'. " +
+                    $"Details: {combinedOutput}{(string.IsNullOrEmpty(lockHint) ? string.Empty : " Hint: " + lockHint)}");

This keeps logs concise while making the extra hint stand out as such.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f63405 and c2214c7.

📒 Files selected for processing (31)
  • MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/CodexConfigHelper.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/ExecPath.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/GameObjectSerializer.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/McpLog.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/PortManager.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/Response.cs (1 hunks)
  • MCPForUnity/Editor/Helpers/TelemetryHelper.cs (1 hunks)
  • MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs (1 hunks)
  • MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs (1 hunks)
  • MCPForUnity/Editor/Resources/Tests/GetTests.cs (1 hunks)
  • MCPForUnity/Editor/Services/BridgeControlService.cs (1 hunks)
  • MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs (1 hunks)
  • MCPForUnity/Editor/Services/PackageUpdateService.cs (1 hunks)
  • MCPForUnity/Editor/Services/ServerManagementService.cs (1 hunks)
  • MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs (1 hunks)
  • MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs (1 hunks)
  • MCPForUnity/Editor/Setup/SetupWindowService.cs (1 hunks)
  • MCPForUnity/Editor/Tools/ManageEditor.cs (1 hunks)
  • MCPForUnity/Editor/Tools/ManageGameObject.cs (1 hunks)
  • MCPForUnity/Editor/Tools/ManageScene.cs (1 hunks)
  • MCPForUnity/Editor/Tools/ManageShader.cs (1 hunks)
  • MCPForUnity/Editor/Tools/ReadConsole.cs (1 hunks)
  • MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs (1 hunks)
  • MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs (3 hunks)
  • MCPForUnity/Editor/Windows/MCPSetupWindow.cs (1 hunks)
  • Server/src/services/tools/manage_editor.py (1 hunks)
  • Server/src/services/tools/manage_gameobject.py (1 hunks)
  • Server/src/services/tools/manage_prefabs.py (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-09-03T16:00:55.839Z
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 0
File: :0-0
Timestamp: 2025-09-03T16:00:55.839Z
Learning: ComponentResolver in UnityMcpBridge/Editor/Tools/ManageGameObject.cs is a nested static class within ManageGameObject, not a sibling type. The `using static MCPForUnity.Editor.Tools.ManageGameObject;` import is required to access ComponentResolver methods directly without the outer class qualifier.

Applied to files:

  • MCPForUnity/Editor/Services/BridgeControlService.cs
  • MCPForUnity/Editor/Tools/ReadConsole.cs
  • MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs
  • MCPForUnity/Editor/Helpers/ExecPath.cs
  • MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs
  • MCPForUnity/Editor/Services/PackageUpdateService.cs
  • MCPForUnity/Editor/Helpers/PortManager.cs
  • MCPForUnity/Editor/Helpers/McpLog.cs
  • MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • MCPForUnity/Editor/Resources/Tests/GetTests.cs
  • MCPForUnity/Editor/Windows/MCPSetupWindow.cs
  • MCPForUnity/Editor/Tools/ManageShader.cs
  • MCPForUnity/Editor/Setup/SetupWindowService.cs
  • MCPForUnity/Editor/Tools/ManageScene.cs
  • MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs
  • MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs
  • MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs
  • MCPForUnity/Editor/Tools/ManageGameObject.cs
  • MCPForUnity/Editor/Helpers/TelemetryHelper.cs
  • MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs
  • MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs
  • MCPForUnity/Editor/Helpers/CodexConfigHelper.cs
  • MCPForUnity/Editor/Tools/ManageEditor.cs
  • MCPForUnity/Editor/Helpers/GameObjectSerializer.cs
📚 Learning: 2025-10-13T13:27:23.040Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.

Applied to files:

  • MCPForUnity/Editor/Services/BridgeControlService.cs
  • MCPForUnity/Editor/Tools/ReadConsole.cs
  • MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs
  • MCPForUnity/Editor/Helpers/ExecPath.cs
  • MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs
  • MCPForUnity/Editor/Services/PackageUpdateService.cs
  • MCPForUnity/Editor/Helpers/PortManager.cs
  • MCPForUnity/Editor/Helpers/McpLog.cs
  • MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs
  • MCPForUnity/Editor/Windows/MCPSetupWindow.cs
  • MCPForUnity/Editor/Tools/ManageShader.cs
  • MCPForUnity/Editor/Helpers/Response.cs
  • MCPForUnity/Editor/Setup/SetupWindowService.cs
  • MCPForUnity/Editor/Tools/ManageScene.cs
  • MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs
  • MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs
  • MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs
  • MCPForUnity/Editor/Tools/ManageGameObject.cs
  • MCPForUnity/Editor/Helpers/TelemetryHelper.cs
  • MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs
  • MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs
  • MCPForUnity/Editor/Helpers/CodexConfigHelper.cs
  • MCPForUnity/Editor/Tools/ManageEditor.cs
  • MCPForUnity/Editor/Helpers/GameObjectSerializer.cs
📚 Learning: 2025-09-04T01:01:11.927Z
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 260
File: UnityMcpBridge/UnityMcpServer~/src/server_version.txt:1-1
Timestamp: 2025-09-04T01:01:11.927Z
Learning: The UnityMcpBridge project is not maintaining changelogs yet, so don't suggest adding changelog entries for version bumps.

Applied to files:

  • MCPForUnity/Editor/Services/BridgeControlService.cs
  • MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs
  • MCPForUnity/Editor/Services/PackageUpdateService.cs
  • MCPForUnity/Editor/Helpers/McpLog.cs
  • MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs
  • MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs
  • MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs
📚 Learning: 2025-10-13T13:41:00.086Z
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.

Applied to files:

  • MCPForUnity/Editor/Helpers/McpLog.cs
  • MCPForUnity/Editor/Windows/MCPSetupWindow.cs
  • MCPForUnity/Editor/Tools/ManageShader.cs
  • MCPForUnity/Editor/Setup/SetupWindowService.cs
  • MCPForUnity/Editor/Tools/ManageScene.cs
  • MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs
  • MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs
  • MCPForUnity/Editor/Tools/ManageEditor.cs
🧬 Code graph analysis (5)
MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs (1)
MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs (2)
  • McpClientConfigSection (21-323)
  • McpClientConfigSection (45-52)
MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs (1)
MCPForUnity/Editor/Tools/ManageGameObject.cs (1)
  • UnityEngine (2177-2274)
MCPForUnity/Editor/Windows/MCPSetupWindow.cs (1)
MCPForUnity/Editor/Tools/ManageGameObject.cs (1)
  • UnityEngine (2177-2274)
MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs (1)
MCPForUnity/Editor/Tools/ManageGameObject.cs (1)
  • UnityEngine (2177-2274)
MCPForUnity/Editor/Services/ServerManagementService.cs (1)
MCPForUnity/Editor/Helpers/McpLog.cs (2)
  • McpLog (7-52)
  • Error (48-51)
🔇 Additional comments (22)
MCPForUnity/Editor/Helpers/GameObjectSerializer.cs (1)

5-5: LGTM!

The using directive reordering consolidates MCPForUnity.Runtime.Serialization with other imports, removing duplication. No functional changes.

MCPForUnity/Editor/Tools/ManageShader.cs (1)

5-5: LGTM!

The using directive reordering places MCPForUnity.Editor.Helpers in proper position and removes duplication. No functional changes.

MCPForUnity/Editor/Services/PackageUpdateService.cs (1)

3-3: LGTM!

The using directive reordering consolidates MCPForUnity.Editor.Constants and removes duplication. No functional changes.

MCPForUnity/Editor/Helpers/Response.cs (1)

5-6: LGTM!

Whitespace formatting standardization for the interface declaration. No functional changes.

MCPForUnity/Editor/Services/BridgeControlService.cs (1)

8-8: LGTM!

The using directive reordering places UnityEditor after MCPForUnity namespace imports. No functional changes.

MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs (1)

57-57: LGTM!

Whitespace standardization adding a blank line for visual separation. No functional changes.

MCPForUnity/Editor/Resources/Tests/GetTests.cs (1)

6-6: LGTM!

The using directive reordering places Newtonsoft.Json.Linq after MCPForUnity namespace imports. No functional changes.

MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs (1)

7-7: LGTM! Import reorganization is consistent with PR-wide formatting standardization.

The relocation of the UnityEditor using directive has no functional impact and aligns with the broader effort to standardize import ordering across the codebase.

MCPForUnity/Editor/Helpers/PortManager.cs (1)

8-10: LGTM! Import reordering maintains functionality.

The repositioning of MCPForUnity.Editor.Constants and UnityEditor using directives is a non-functional formatting improvement consistent with the PR's standardization goals.

MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs (1)

2-2: LGTM! Import consolidation improves code organization.

Adding MCPForUnity.Editor.Constants at the top and removing duplicate imports elsewhere in the file is a clean refactoring with no behavioral changes.

MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs (1)

3-4: LGTM! Consistent import ordering.

The swap of MCPForUnity.Editor.Constants and UnityEditor using directives is a non-functional change that improves consistency across the codebase.

MCPForUnity/Editor/Helpers/McpLog.cs (1)

1-1: LGTM! Import addition improves code clarity.

Adding the MCPForUnity.Editor.Constants using directive allows direct access to EditorPrefKeys and maintains consistency with other files in this PR.

MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs (1)

3-5: LGTM! Import consolidation follows PR pattern.

Adding System.Linq and MCPForUnity.Editor.Constants at the top and removing duplicates elsewhere improves consistency with the PR's standardization goals.

MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs (1)

11-13: LGTM! Import ordering follows convention.

Relocating Unity-specific using directives (UnityEditor, UnityEngine, UnityEngine.UIElements) after project-specific imports is a common convention and has no functional impact.

MCPForUnity/Editor/Setup/SetupWindowService.cs (1)

2-3: LGTM! Import consolidation maintains clarity.

Adding MCPForUnity.Editor.Config and MCPForUnity.Editor.Constants at the top while removing duplicate placements is a clean organizational improvement with no behavioral changes.

MCPForUnity/Editor/Tools/ManageScene.cs (1)

5-5: LGTM! Good cleanup.

Removing the duplicate import and adding a clarifying comment improves code maintainability.

MCPForUnity/Editor/Tools/ManageGameObject.cs (1)

6-7: LGTM! Import consolidation improves organization.

Moving these imports to the top with clarifying comments and removing duplicates enhances code readability. Both imports are actively used throughout the file for Response classes and serialization helpers.

MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs (1)

4-7: LGTM! Consistent import ordering.

The reordering of using directives aligns with the broader standardization effort across the codebase. No functional impact.

MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs (1)

3-19: LGTM! Import standardization.

The reordering and addition of using directives aligns with the codebase-wide standardization effort. No functional changes.

Server/src/services/tools/manage_editor.py (1)

16-16: I'm encountering persistent issues accessing the repository needed to verify the C# implementation. The repository clone is failing, which prevents me from searching for the ManageEditorCommand handler and confirming the action set alignment.

Given this situation, let me provide the rewritten review comment based on what can be determined:


Unable to verify action set alignment with Unity C# implementation due to repository access limitations.

The action literals have been reduced to a focused set: telemetry diagnostics, playmode controls, and tag/layer management. This appears to align with schema refinement similar to previous fixes. However, verification that the Unity C# ManageEditorCommand handler supports exactly this action set and does not implement the removed actions (get_state, get_project_root, get_windows, get_active_tool, get_selection, get_prefab_stage, get_tags) could not be completed due to inability to access the C# codebase.

Recommendation: Run the provided verification script against the Unity C# implementation to confirm:

  • The handler implements all actions in the narrowed set
  • The handler does not contain case statements for removed actions
Server/src/services/tools/manage_prefabs.py (1)

11-11: Issue number mismatch: The review incorrectly references issue #379 (missing release ZIP) instead of issue #383 (actual prefab schema mismatch).

The web search reveals that the prefab schema mismatch issue is tracked under issue #383, not #379. Issue #379 concerns a missing release ZIP file. While the Python-side changes to the action set appear reasonable (updating from CRUD-style operations to actual Unity prefab stage operations: "open_stage", "close_stage", "save_open_stage", "create_from_gameobject"), verification of the corresponding Unity C# ManagePrefabsCommand implementation cannot be completed due to repository access limitations. The C# side implementation should be manually verified to ensure it handles exactly these four action strings and that no legacy CRUD operations remain.

Server/src/services/tools/manage_gameobject.py (1)

16-16: Verify that Unity C# implementation actually implements the new "get_component" action.

The review comment requests verification that the Unity C# side's ManageGameObjectCommand handler implements the new "get_component" action and clarifies its functional difference from "get_components" (plural). I was unable to access the repository or external documentation to confirm this implementation exists. Manual verification of the C# codebase is required to ensure:

  1. The ManageGameObjectCommand handler includes a case for "get_component"
  2. The implementation is complete and functional
  3. The functional distinction from "get_components" is documented

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
MCPForUnity/Editor/Services/ServerManagementService.cs (1)

44-61: Improved failure diagnostics look solid; consider minor log formatting tweak (optional).

The new combined stdout/stderr handling, empty-output fallback, and lock-hint detection are all safe and materially improve troubleshooting. Nice upgrade.

If you want to polish further, you could put the hint on a separate line for readability, e.g. append Environment.NewLine + "Hint: ...", but that’s purely cosmetic and not required.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2214c7 and 2f56e23.

📒 Files selected for processing (1)
  • MCPForUnity/Editor/Services/ServerManagementService.cs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.
🧬 Code graph analysis (1)
MCPForUnity/Editor/Services/ServerManagementService.cs (1)
MCPForUnity/Editor/Helpers/McpLog.cs (2)
  • McpLog (7-52)
  • Error (48-51)

@msanatan msanatan merged commit adfc6f5 into CoplayDev:main Nov 28, 2025
1 check passed
@msanatan msanatan deleted the fix-manage-prefabs branch November 28, 2025 22:47
dsarno added a commit to dsarno/unity-mcp that referenced this pull request Dec 2, 2025
* 'main' of https://github.com/CoplayDev/unity-mcp:
  chore: bump version to 8.1.4
  Fix Claude Windows config and CLI status refresh (CoplayDev#412)
  chore: bump version to 8.1.3
  fix: restrict fastmcp version to avoid potential KeyError (CoplayDev#411)
  chore: bump version to 8.1.2
  Revert project script change
  chore: bump version to 8.1.1
  Fix CLI entry point path in pyproject.toml (CoplayDev#407)
  Fix manage prefabs (CoplayDev#405)
  Remove automatic version bumping from README files and switch to unversioned git URLs
  chore: bump version to 8.1.0
  Add distribution settings for Asset Store vs git defaults (CoplayDev#404)
  Add CodeBuddy CLI configurator (CoplayDev#403)
  Fix stdio reloads (CoplayDev#402)
  Simplify MCP client configs (CoplayDev#401)
  chore: bump version to 8.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client/server schema mismatch on manage prefabs

1 participant