Enhance logging in MCPServer to include argument serialization in tool call messages, improving clarity and debugging capabilities.
This commit is contained in:
@@ -89,7 +89,9 @@ class MCPServer:
|
||||
|
||||
handler = self.tools[name]
|
||||
logger.info(
|
||||
f"MCP工具调用开始: server={self.name}, tool={name}, args={json.dumps(arguments, ensure_ascii=False)}"
|
||||
"MCP工具调用开始: "
|
||||
f"server={self.name}, tool={name}, "
|
||||
f"args={json.dumps(arguments, ensure_ascii=False, default=str)}"
|
||||
)
|
||||
try:
|
||||
result = await handler(**arguments)
|
||||
|
||||
Reference in New Issue
Block a user