guohanghui commited on
Commit
10bc26c
·
verified ·
1 Parent(s): 866d61a

Update medpy/mcp_output/mcp_plugin/mcp_service.py

Browse files
medpy/mcp_output/mcp_plugin/mcp_service.py CHANGED
@@ -74,22 +74,22 @@ from medpy.utilities import argparseu
74
 
75
  mcp = FastMCP("medpy_service")
76
 
77
- @mcp.tool(name="log_exception", description="Log an exception using the MedPy logger.")
78
- def log_exception(exception: Exception) -> dict:
79
- """
80
- Logs an exception using the MedPy logger.
81
-
82
- Parameters:
83
- - exception: Exception instance to be logged.
84
-
85
- Returns:
86
- - dict: Contains success status and result message.
87
- """
88
- try:
89
- Logger().exception(exception)
90
- return {"success": True, "result": "Exception logged successfully", "error": None}
91
- except Exception as e:
92
- return {"success": False, "result": None, "error": str(e)}
93
 
94
  # ===== IO 工具 =====
95
  @mcp.tool(name="load_image", description="Load medical image from file.")
 
74
 
75
  mcp = FastMCP("medpy_service")
76
 
77
+ # @mcp.tool(name="log_exception", description="Log an exception using the MedPy logger.")
78
+ # def log_exception(exception: Exception) -> dict:
79
+ # """
80
+ # Logs an exception using the MedPy logger.
81
+
82
+ # Parameters:
83
+ # - exception: Exception instance to be logged.
84
+
85
+ # Returns:
86
+ # - dict: Contains success status and result message.
87
+ # """
88
+ # try:
89
+ # Logger().exception(exception)
90
+ # return {"success": True, "result": "Exception logged successfully", "error": None}
91
+ # except Exception as e:
92
+ # return {"success": False, "result": None, "error": str(e)}
93
 
94
  # ===== IO 工具 =====
95
  @mcp.tool(name="load_image", description="Load medical image from file.")