-
Notifications
You must be signed in to change notification settings - Fork 778
Open
Description
Description
Custom tools registered via [McpForUnityTool] attribute are discovered and work correctly in HTTP transport mode, but are not available when using stdio transport mode.
Steps to Reproduce
- Create a custom tool in a Unity project:
using MCPForUnity.Editor.Tools;
using MCPForUnity.Editor.Helpers;
using Newtonsoft.Json.Linq;
namespace PkgUnityMcp.Editor.Tools
{
[McpForUnityTool("test_ping",
Description = "Simple test tool that returns a pong.")]
public static class McpPingTool
{
public static object HandleCommand(JObject @params)
{
string message = @params?["message"]?.ToString() ?? "pong";
return new SuccessResponse($"test_ping reply: {message}", new
{
reply = message,
source = "custom_tool"
});
}
}
}- Wait for compilation to complete
- Connect via stdio mode
- Attempt to call
test_ping- tool is not found (Unknown or unsupported command type: test_ping) - Switch to HTTP mode
- Call
test_pingviaexecute_custom_tool- works correctly, returns{"reply": "hello from Claude Code", "source": "custom_tool"}
Expected Behavior
Custom tools should be discoverable and callable in both stdio and HTTP transport modes.
Actual Behavior
- HTTP mode: Custom tools are discovered and work correctly
- stdio mode: Custom tools are not registered. Calling them returns
Unknown or unsupported command type
Environment
- MCP for Unity: 9.4.8-beta.3
- Unity: 2021.3.58f1
- Client: Claude Code
- OS: Windows 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels