From 2d8e251e0148957c7dcaabfda0a2d971a1e4f4a1 Mon Sep 17 00:00:00 2001 From: Marcus Sanatan Date: Mon, 13 Oct 2025 11:41:16 -0400 Subject: [PATCH] fix: apply telemetry decorator before MCP tool registration to ensure proper wrapping order for the old repo --- UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py b/UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py index 6ede53d..bfdee09 100644 --- a/UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py +++ b/UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py @@ -51,9 +51,9 @@ def register_all_tools(mcp: FastMCP): kwargs = tool_info['kwargs'] # Apply the @mcp.tool decorator and telemetry + wrapped = telemetry_tool(tool_name)(func) wrapped = mcp.tool( - name=tool_name, description=description, **kwargs)(func) - wrapped = telemetry_tool(tool_name)(wrapped) + name=tool_name, description=description, **kwargs)(wrapped) tool_info['func'] = wrapped logger.info(f"Registered tool: {tool_name} - {description}")