添加 MCP 返回结果日志记录功能,更新相关配置和文档,改善 MCP 结果返回

This commit is contained in:
2025-09-05 22:00:50 +08:00
parent b2914be3c1
commit 3dbe00e1d6
7 changed files with 18 additions and 5 deletions

View File

@@ -195,6 +195,8 @@ class MarshoHandler:
)
else:
func_return = await handle_mcp_tool(tool_name, function_args)
if config.marshoai_enable_mcp_result_logging:
logger.info(f"MCP工具 {tool_clean_name} 返回结果: {func_return}")
tool_msg.append(
ToolMessage(tool_call_id=tool_call.id, content=func_return).as_dict() # type: ignore
)