fix: apply telemetry decorator before MCP tool registration to ensure proper wrapping order for the old repo
parent
3d82cb26b0
commit
2d8e251e01
|
|
@ -51,9 +51,9 @@ def register_all_tools(mcp: FastMCP):
|
||||||
kwargs = tool_info['kwargs']
|
kwargs = tool_info['kwargs']
|
||||||
|
|
||||||
# Apply the @mcp.tool decorator and telemetry
|
# Apply the @mcp.tool decorator and telemetry
|
||||||
|
wrapped = telemetry_tool(tool_name)(func)
|
||||||
wrapped = mcp.tool(
|
wrapped = mcp.tool(
|
||||||
name=tool_name, description=description, **kwargs)(func)
|
name=tool_name, description=description, **kwargs)(wrapped)
|
||||||
wrapped = telemetry_tool(tool_name)(wrapped)
|
|
||||||
tool_info['func'] = wrapped
|
tool_info['func'] = wrapped
|
||||||
logger.info(f"Registered tool: {tool_name} - {description}")
|
logger.info(f"Registered tool: {tool_name} - {description}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue