unity-mcp/MCPForUnity/Editor
dsarno 2b23af45a2
Fix/script path assets prefix and ctx warn bug (#453)
* Fix script path handling and FastMCP Context API usage

1. Fix script path doubling when Assets prefix is used
   - ManageScript.TryResolveUnderAssets now properly handles both Assets and Assets/ prefixes
   - Previously, paths like Assets/Script.cs would create files at Assets/Assets/Script.cs
   - Now correctly strips the prefix and creates files at the intended location

2. Fix FastMCP Context API call in manage_asset
   - Changed ctx.warn() to ctx.warning() to match FastMCP Context API
   - Fixes AttributeError when manage_asset encounters property parse errors
   - Affects ScriptableObject creation and other asset operations with invalid properties

* Fix manage_asset error handling to use ctx.error

Changed ctx.warning to ctx.error for property parse errors in manage_asset
tool to properly handle error cases. This ensures parse errors are reported
as errors rather than warnings, and fixes compatibility with FastMCP Context API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-10 20:09:16 -08:00
..
Clients Support GitHub Copilot in VSCode Insiders + robustness improvements and bug fixes (#425) 2025-12-04 11:41:01 -08:00
Config Add distribution settings for Asset Store vs git defaults (#404) 2025-11-27 22:10:21 -04:00
Constants [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
Dependencies Fix: Python Detection, Port Conflicts, and Script Creation Reliability (#428) 2025-12-04 13:19:42 -08:00
External Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
MenuItems fix: Changed flag management to EditorPrefs (#408) 2025-12-01 19:49:28 -08:00
Migrations Fix manage prefabs (#405) 2025-11-28 18:47:11 -04:00
Models Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Resources Fix manage prefabs (#405) 2025-11-28 18:47:11 -04:00
Services Unity MCP CI Test Improvements (#452) 2025-12-10 14:54:55 -08:00
Setup fix: Changed flag management to EditorPrefs (#408) 2025-12-01 19:49:28 -08:00
Tools Fix/script path assets prefix and ctx warn bug (#453) 2025-12-10 20:09:16 -08:00
Windows [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
AssemblyInfo.cs Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
AssemblyInfo.cs.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Clients.meta Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Config.meta Add distribution settings for Asset Store vs git defaults (#404) 2025-11-27 22:10:21 -04:00
Constants.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Data.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Dependencies.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
External.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
MCPForUnity.Editor.asmdef HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPForUnity.Editor.asmdef.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
McpCiBoot.cs Unity MCP CI Test Improvements (#452) 2025-12-10 14:54:55 -08:00
McpCiBoot.cs.meta Unity MCP CI Test Improvements (#452) 2025-12-10 14:54:55 -08:00
MenuItems.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Migrations.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Models.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Resources.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
Services.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
Setup.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Tools.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Windows.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00