feat: 提交 一下
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:213] - ================================================================================
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:214] - 日志系统初始化完成 - 2026-01-19 16:05:23
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:215] - 日志级别: INFO
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:216] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:217] - 控制台输出: False
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:218] - 文件输出: True
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:219] - 文件轮转: 最大10MB, 保留5个备份
|
||||
2026-01-19 16:05:23 - src.utils.logger_config - INFO - [logger_config.py:220] - ================================================================================
|
||||
2026-01-19 16:05:23 - __main__ - INFO - [main.py:50] - ================================================================================
|
||||
2026-01-19 16:05:23 - __main__ - INFO - [main.py:51] - Dify MCP 服务器启动
|
||||
2026-01-19 16:05:23 - __main__ - INFO - [main.py:52] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 16:05:23 - __main__ - INFO - [main.py:53] - ================================================================================
|
||||
2026-01-19 16:05:25 - src.workflow.workflow_server - INFO - [workflow_server.py:322] - 调用 /parameters API: http://192.168.11.24:3001/v1/parameters
|
||||
2026-01-19 16:05:25 - src.workflow.workflow_server - INFO - [workflow_server.py:323] - 请求头: {'Authorization': 'Bearer app-RM7IGxvdq48ixu1JXFiUZh76'}
|
||||
2026-01-19 16:05:25 - src.workflow.workflow_server - INFO - [workflow_server.py:324] - 请求参数: {'user': 'pp666'}
|
||||
2026-01-19 16:05:25 - src.workflow.workflow_server - INFO - [workflow_server.py:328] - /parameters API 响应状态码: 200
|
||||
2026-01-19 16:05:25 - src.workflow.workflow_server - INFO - [workflow_server.py:333] - /parameters API 响应数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'file': {'variable': 'contact_file', 'label': 'contact_file', 'type': 'file', 'max_length': 4096, 'required': True, 'options': [], 'allowed_file_upload_methods': ['remote_url'], 'allowed_file_types': ['document'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 16:05:25 - __main__ - INFO - [main.py:68] - 传输模式: stdio
|
||||
2026-01-19 16:05:25 - __main__ - INFO - [main.py:69] - 配置参数: {'base_url': 'http://192.168.11.24:3001/v1', 'app_sks': ['app-RM7IGxvdq48ixu1JXFiUZh76'], 'mode_type': 'workflow', 'transport': 'stdio'}
|
||||
2026-01-19 16:05:26 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2026-01-19 16:05:26 - src.create_mcp - INFO - [create_mcp.py:104] - 工具 tool_HeTongShenChaGongZuoLiu 的 parameters 数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'file': {'variable': 'contact_file', 'label': 'contact_file', 'type': 'file', 'max_length': 4096, 'required': True, 'options': [], 'allowed_file_upload_methods': ['remote_url'], 'allowed_file_types': ['document'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 16:05:26 - src.create_mcp - INFO - [create_mcp.py:110] - 工具 tool_HeTongShenChaGongZuoLiu 提取的文件字段: [{'variable': 'contact_file', 'label': 'contact_file', 'required': True, 'max_length': 4096, 'allowed_file_types': ['document'], 'allowed_file_upload_methods': ['remote_url'], 'allowed_file_extensions': [], 'is_list': False}]
|
||||
2026-01-19 16:06:14 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2026-01-19 16:06:14 - src.create_mcp - INFO - [create_mcp.py:144] - 工具 tool_HeTongShenChaGongZuoLiu 的文件字段信息: [{'variable': 'contact_file', 'label': 'contact_file', 'required': True, 'max_length': 4096, 'allowed_file_types': ['document'], 'allowed_file_upload_methods': ['remote_url'], 'allowed_file_extensions': [], 'is_list': False}]
|
||||
2026-01-19 16:06:14 - src.create_mcp - INFO - [create_mcp.py:145] - 工具 tool_HeTongShenChaGongZuoLiu 调用前的 arguments: {'contact_file': [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]}
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:64] - 工具 tool_HeTongShenChaGongZuoLiu 的文件字段变量名: {'contact_file'}
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:73] - 工具 tool_HeTongShenChaGongZuoLiu: 发现文件字段 contact_file,值: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:168] - 工具 tool_HeTongShenChaGongZuoLiu: 处理文件列表: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:85] - 工具 tool_HeTongShenChaGongZuoLiu: 准备处理文件列表: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:322] - 从URL http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx 提取的文件扩展名: docx
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:333] - URL http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx 匹配文件类型: document
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:96] - 工具 tool_HeTongShenChaGongZuoLiu: 自动识别文件类型为 document
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:242] - 开始上传远程文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:400] - 开始处理文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:86] - 正在下载文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx (尝试 1/3)
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:100] - 文件下载成功: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx (大小: 20445 字节)
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:189] - 准备上传文件: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx (大小: 0.02 MB)
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:220] - 文件上传成功: eb25b2b233a8719f680d4b0b9c5a80e7.docx (ID: e2ec6720-9cf9-4a64-aa31-102e787a343b)
|
||||
2026-01-19 16:06:14 - src.utils.upload_file - INFO - [upload_file.py:417] - 已清理临时文件: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:255] - 文件上传成功 - ID: e2ec6720-9cf9-4a64-aa31-102e787a343b, 名称: eb25b2b233a8719f680d4b0b9c5a80e7.docx, 大小: 20445 bytes
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:274] - 文件预处理完成,共处理 1 个文件
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:111] - 工具 tool_HeTongShenChaGongZuoLiu: 文件预处理完成,成功上传 1 个文件
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:219] - 工具 tool_HeTongShenChaGongZuoLiu: 字段 contact_file 是 file 类型,输出单个对象
|
||||
2026-01-19 16:06:14 - src.create_mcp_utils - INFO - [create_mcp_utils.py:221] - 工具 tool_HeTongShenChaGongZuoLiu: 字段 contact_file 最终值: {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'e2ec6720-9cf9-4a64-aa31-102e787a343b'}
|
||||
2026-01-19 16:06:14 - src.create_mcp - INFO - [create_mcp.py:149] - 工具 tool_HeTongShenChaGongZuoLiu 处理后的 arguments: {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'e2ec6720-9cf9-4a64-aa31-102e787a343b'}}
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:131] - Sending data to Dify API: {'inputs': {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'e2ec6720-9cf9-4a64-aa31-102e787a343b'}}, 'response_mode': 'streaming', 'user': 'pp666'}
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:132] - Sending headers to Dify API: {'Authorization': 'Bearer app-RM7IGxvdq48ixu1JXFiUZh76', 'Content-Type': 'application/json'}
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:133] - Sending url to Dify API: http://192.168.11.24:3001/v1/workflows/run
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - INFO - [workflow_server.py:148] - Response1:{'inputs': {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'e2ec6720-9cf9-4a64-aa31-102e787a343b'}}, 'response_mode': 'streaming', 'user': 'pp666'} 400 BAD REQUEST
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - ERROR - [workflow_server.py:152] - API request failed with status 400
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - ERROR - [workflow_server.py:153] - Response content: {"code": "invalid_param", "message": "File validation failed for file: eb25b2b233a8719f680d4b0b9c5a80e7.docx", "status": 400}
|
||||
|
||||
2026-01-19 16:06:14 - src.workflow.workflow_server - ERROR - [workflow_server.py:154] - Request data: {'inputs': {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'e2ec6720-9cf9-4a64-aa31-102e787a343b'}}, 'response_mode': 'streaming', 'user': 'pp666'}
|
||||
2026-01-19 16:06:14 - src.create_mcp - ERROR - [create_mcp.py:178] - 工具 tool_HeTongShenChaGongZuoLiu 调用 Dify API 失败: [400] invalid_param: File validation failed for file: eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:213] - ================================================================================
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:214] - 日志系统初始化完成 - 2026-01-19 16:21:31
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:215] - 日志级别: INFO
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:216] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:217] - 控制台输出: False
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:218] - 文件输出: True
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:219] - 文件轮转: 最大10MB, 保留5个备份
|
||||
2026-01-19 16:21:31 - src.utils.logger_config - INFO - [logger_config.py:220] - ================================================================================
|
||||
2026-01-19 16:21:31 - __main__ - INFO - [main.py:50] - ================================================================================
|
||||
2026-01-19 16:21:31 - __main__ - INFO - [main.py:51] - Dify MCP 服务器启动
|
||||
2026-01-19 16:21:31 - __main__ - INFO - [main.py:52] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 16:21:31 - __main__ - INFO - [main.py:53] - ================================================================================
|
||||
2026-01-19 16:21:33 - src.workflow.workflow_server - INFO - [workflow_server.py:322] - 调用 /parameters API: http://192.168.11.24:3001/v1/parameters
|
||||
2026-01-19 16:21:33 - src.workflow.workflow_server - INFO - [workflow_server.py:323] - 请求头: {'Authorization': 'Bearer app-RM7IGxvdq48ixu1JXFiUZh76'}
|
||||
2026-01-19 16:21:33 - src.workflow.workflow_server - INFO - [workflow_server.py:324] - 请求参数: {'user': 'pp666'}
|
||||
2026-01-19 16:21:33 - src.workflow.workflow_server - INFO - [workflow_server.py:328] - /parameters API 响应状态码: 200
|
||||
2026-01-19 16:21:33 - src.workflow.workflow_server - INFO - [workflow_server.py:333] - /parameters API 响应数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'file': {'variable': 'contact_file', 'label': 'contact_file', 'type': 'file', 'max_length': 4096, 'required': True, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['document'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 16:21:33 - __main__ - INFO - [main.py:68] - 传输模式: stdio
|
||||
2026-01-19 16:21:33 - __main__ - INFO - [main.py:69] - 配置参数: {'base_url': 'http://192.168.11.24:3001/v1', 'app_sks': ['app-RM7IGxvdq48ixu1JXFiUZh76'], 'mode_type': 'workflow', 'transport': 'stdio'}
|
||||
2026-01-19 16:21:37 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2026-01-19 16:21:37 - src.create_mcp - INFO - [create_mcp.py:104] - 工具 tool_HeTongShenChaGongZuoLiu 的 parameters 数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'file': {'variable': 'contact_file', 'label': 'contact_file', 'type': 'file', 'max_length': 4096, 'required': True, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['document'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 16:21:37 - src.create_mcp - INFO - [create_mcp.py:110] - 工具 tool_HeTongShenChaGongZuoLiu 提取的文件字段: [{'variable': 'contact_file', 'label': 'contact_file', 'required': True, 'max_length': 4096, 'allowed_file_types': ['document'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_extensions': [], 'is_list': False}]
|
||||
2026-01-19 16:21:46 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2026-01-19 16:21:46 - src.create_mcp - INFO - [create_mcp.py:144] - 工具 tool_HeTongShenChaGongZuoLiu 的文件字段信息: [{'variable': 'contact_file', 'label': 'contact_file', 'required': True, 'max_length': 4096, 'allowed_file_types': ['document'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_extensions': [], 'is_list': False}]
|
||||
2026-01-19 16:21:46 - src.create_mcp - INFO - [create_mcp.py:145] - 工具 tool_HeTongShenChaGongZuoLiu 调用前的 arguments: {'contact_file': [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]}
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:64] - 工具 tool_HeTongShenChaGongZuoLiu 的文件字段变量名: {'contact_file'}
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:73] - 工具 tool_HeTongShenChaGongZuoLiu: 发现文件字段 contact_file,值: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:168] - 工具 tool_HeTongShenChaGongZuoLiu: 处理文件列表: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:85] - 工具 tool_HeTongShenChaGongZuoLiu: 准备处理文件列表: [{'url': 'http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx'}]
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:322] - 从URL http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx 提取的文件扩展名: docx
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:333] - URL http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx 匹配文件类型: document
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:96] - 工具 tool_HeTongShenChaGongZuoLiu: 自动识别文件类型为 document
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:242] - 开始上传远程文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:400] - 开始处理文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:86] - 正在下载文件: http://192.168.11.24:9000/lzwcai/upload/2026-01-19/eb25b2b233a8719f680d4b0b9c5a80e7/eb25b2b233a8719f680d4b0b9c5a80e7.docx (尝试 1/3)
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:100] - 文件下载成功: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx (大小: 20445 字节)
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:189] - 准备上传文件: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx (大小: 0.02 MB)
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:220] - 文件上传成功: eb25b2b233a8719f680d4b0b9c5a80e7.docx (ID: c09a25e0-9d92-4b8d-b098-a59d6be10921)
|
||||
2026-01-19 16:21:46 - src.utils.upload_file - INFO - [upload_file.py:417] - 已清理临时文件: C:\Users\HiWin10\AppData\Local\Temp\eb25b2b233a8719f680d4b0b9c5a80e7.docx
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:255] - 文件上传成功 - ID: c09a25e0-9d92-4b8d-b098-a59d6be10921, 名称: eb25b2b233a8719f680d4b0b9c5a80e7.docx, 大小: 20445 bytes
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:274] - 文件预处理完成,共处理 1 个文件
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:111] - 工具 tool_HeTongShenChaGongZuoLiu: 文件预处理完成,成功上传 1 个文件
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:219] - 工具 tool_HeTongShenChaGongZuoLiu: 字段 contact_file 是 file 类型,输出单个对象
|
||||
2026-01-19 16:21:46 - src.create_mcp_utils - INFO - [create_mcp_utils.py:221] - 工具 tool_HeTongShenChaGongZuoLiu: 字段 contact_file 最终值: {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'c09a25e0-9d92-4b8d-b098-a59d6be10921'}
|
||||
2026-01-19 16:21:46 - src.create_mcp - INFO - [create_mcp.py:149] - 工具 tool_HeTongShenChaGongZuoLiu 处理后的 arguments: {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'c09a25e0-9d92-4b8d-b098-a59d6be10921'}}
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:131] - Sending data to Dify API: {'inputs': {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'c09a25e0-9d92-4b8d-b098-a59d6be10921'}}, 'response_mode': 'streaming', 'user': 'pp666'}
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:132] - Sending headers to Dify API: {'Authorization': 'Bearer app-RM7IGxvdq48ixu1JXFiUZh76', 'Content-Type': 'application/json'}
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:133] - Sending url to Dify API: http://192.168.11.24:3001/v1/workflows/run
|
||||
2026-01-19 16:21:46 - src.workflow.workflow_server - INFO - [workflow_server.py:148] - Response1:{'inputs': {'contact_file': {'transfer_method': 'local_file', 'type': 'document', 'upload_file_id': 'c09a25e0-9d92-4b8d-b098-a59d6be10921'}}, 'response_mode': 'streaming', 'user': 'pp666'} 200 OK
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:213] - ================================================================================
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:214] - 日志系统初始化完成 - 2026-01-19 22:09:39
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:215] - 日志级别: INFO
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:216] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:217] - 控制台输出: False
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:218] - 文件输出: True
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:219] - 文件轮转: 最大10MB, 保留5个备份
|
||||
2026-01-19 22:09:39 - src.utils.logger_config - INFO - [logger_config.py:220] - ================================================================================
|
||||
2026-01-19 22:09:39 - __main__ - INFO - [main.py:50] - ================================================================================
|
||||
2026-01-19 22:09:39 - __main__ - INFO - [main.py:51] - Dify MCP 服务器启动
|
||||
2026-01-19 22:09:39 - __main__ - INFO - [main.py:52] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:09:39 - __main__ - INFO - [main.py:53] - ================================================================================
|
||||
2026-01-19 22:09:54 - src.workflow.workflow_server - INFO - [workflow_server.py:322] - 调用 /parameters API: http://192.167.30.8:3001/v1/parameters
|
||||
2026-01-19 22:09:54 - src.workflow.workflow_server - INFO - [workflow_server.py:323] - 请求头: {'Authorization': 'Bearer app-0dlxPuFY8HBXo6PpoeStQCjA'}
|
||||
2026-01-19 22:09:54 - src.workflow.workflow_server - INFO - [workflow_server.py:324] - 请求参数: {'user': 'pp666'}
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:213] - ================================================================================
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:214] - 日志系统初始化完成 - 2026-01-19 22:09:55
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:215] - 日志级别: INFO
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:216] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:217] - 控制台输出: False
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:218] - 文件输出: True
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:219] - 文件轮转: 最大10MB, 保留5个备份
|
||||
2026-01-19 22:09:55 - src.utils.logger_config - INFO - [logger_config.py:220] - ================================================================================
|
||||
2026-01-19 22:09:55 - __main__ - INFO - [main.py:50] - ================================================================================
|
||||
2026-01-19 22:09:55 - __main__ - INFO - [main.py:51] - Dify MCP 服务器启动
|
||||
2026-01-19 22:09:55 - __main__ - INFO - [main.py:52] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:09:55 - __main__ - INFO - [main.py:53] - ================================================================================
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:213] - ================================================================================
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:214] - 日志系统初始化完成 - 2026-01-19 22:10:01
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:215] - 日志级别: INFO
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:216] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:217] - 控制台输出: False
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:218] - 文件输出: True
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:219] - 文件轮转: 最大10MB, 保留5个备份
|
||||
2026-01-19 22:10:01 - src.utils.logger_config - INFO - [logger_config.py:220] - ================================================================================
|
||||
2026-01-19 22:10:01 - __main__ - INFO - [main.py:50] - ================================================================================
|
||||
2026-01-19 22:10:01 - __main__ - INFO - [main.py:51] - Dify MCP 服务器启动
|
||||
2026-01-19 22:10:01 - __main__ - INFO - [main.py:52] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_demp_tool_server_dify_to_mcp_test\lzwcai_demp_tool_server_dify_to_mcp_test\logs\lzwcai_demp_tool_server_dify_to_mcp_test.log
|
||||
2026-01-19 22:10:01 - __main__ - INFO - [main.py:53] - ================================================================================
|
||||
2026-01-19 22:10:06 - src.workflow.workflow_server - INFO - [workflow_server.py:322] - 调用 /parameters API: http://192.167.30.8:3001/v1/parameters
|
||||
2026-01-19 22:10:06 - src.workflow.workflow_server - INFO - [workflow_server.py:323] - 请求头: {'Authorization': 'Bearer app-0dlxPuFY8HBXo6PpoeStQCjA'}
|
||||
2026-01-19 22:10:06 - src.workflow.workflow_server - INFO - [workflow_server.py:324] - 请求参数: {'user': 'pp666'}
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:328] - /parameters API 响应状态码: 200
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:333] - /parameters API 响应数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'paragraph': {'variable': 'contentText', 'label': '订单内容', 'type': 'paragraph', 'max_length': 48000, 'required': False, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['image', 'document'], 'allowed_file_extensions': []}}, {'file': {'variable': 'contentFile', 'label': '文件内容', 'type': 'file', 'max_length': 5, 'required': False, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['document', 'image'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:322] - 调用 /parameters API: http://192.167.30.8:3001/v1/parameters
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:328] - /parameters API 响应状态码: 200
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:323] - 请求头: {'Authorization': 'Bearer app-0dlxPuFY8HBXo6PpoeStQCjA'}
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:333] - /parameters API 响应数据: {'opening_statement': '', 'suggested_questions': [], 'suggested_questions_after_answer': {'enabled': False}, 'speech_to_text': {'enabled': False}, 'text_to_speech': {'enabled': False, 'voice': '', 'language': ''}, 'retriever_resource': {'enabled': True}, 'annotation_reply': {'enabled': False}, 'more_like_this': {'enabled': False}, 'user_input_form': [{'paragraph': {'variable': 'contentText', 'label': '订单内容', 'type': 'paragraph', 'max_length': 48000, 'required': False, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['image', 'document'], 'allowed_file_extensions': []}}, {'file': {'variable': 'contentFile', 'label': '文件内容', 'type': 'file', 'max_length': 5, 'required': False, 'options': [], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'allowed_file_types': ['document', 'image'], 'allowed_file_extensions': []}}], 'sensitive_word_avoidance': {'enabled': False}, 'file_upload': {'image': {'enabled': False, 'number_limits': 3, 'transfer_methods': ['local_file', 'remote_url']}, 'enabled': False, 'allowed_file_types': ['image'], 'allowed_file_extensions': ['.JPG', '.JPEG', '.PNG', '.GIF', '.WEBP', '.SVG'], 'allowed_file_upload_methods': ['local_file', 'remote_url'], 'number_limits': 3, 'fileUploadConfig': {'file_size_limit': 15, 'batch_count_limit': 5, 'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'workflow_file_upload_limit': 10}}, 'system_parameters': {'image_file_size_limit': 10, 'video_file_size_limit': 100, 'audio_file_size_limit': 50, 'file_size_limit': 15, 'workflow_file_upload_limit': 10}}
|
||||
2026-01-19 22:10:10 - src.workflow.workflow_server - INFO - [workflow_server.py:324] - 请求参数: {'user': 'pp666'}
|
||||
2026-01-19 22:10:13 - __main__ - INFO - [main.py:68] - 传输模式: stdio
|
||||
2026-01-19 22:10:13 - __main__ - INFO - [main.py:69] - 配置参数: {'base_url': 'http://192.167.30.8:3001/v1', 'app_sks': ['app-0dlxPuFY8HBXo6PpoeStQCjA'], 'mode_type': 'workflow', 'transport': 'stdio'}
|
||||
2026-01-19 22:10:17 - __main__ - INFO - [main.py:68] - 传输模式: stdio
|
||||
2026-01-19 22:10:17 - __main__ - INFO - [main.py:69] - 配置参数: {'base_url': 'http://192.167.30.8:3001/v1', 'app_sks': ['app-0dlxPuFY8HBXo6PpoeStQCjA'], 'mode_type': 'workflow', 'transport': 'stdio'}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -206,3 +206,37 @@
|
||||
2026-01-10 00:47:45 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: MetricTrendAndTurningPointWarning
|
||||
2026-01-10 00:47:45 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-10 00:47:46 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:362] - 开始运行 MCP SQL Executor 服务器
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:313] - ============================================================
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:314] - 正在启动 MCP 服务器: lzwcai-mcpskills-analyzeOrder
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:315] - 版本: 0.1.0
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:316] - ============================================================
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:320] - 环境配置 - Database ID: 19
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:321] - 环境配置 - Datasource ID: 19
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:322] - 环境配置 - Skill ID:
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:323] - 环境配置 - Backend Base URL: http://192.168.11.24:8088
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:324] - ============================================================
|
||||
2026-01-16 12:39:13 - mcp_services - INFO - [main.py:329] - MCP 服务器已启动,等待客户端连接...
|
||||
2026-01-16 12:39:14 - mcp_services - INFO - [main.py:156] - 收到列出工具请求
|
||||
2026-01-16 12:39:14 - mcp_services - INFO - [main.py:119] - 初始化查询配置(数据源: local)...
|
||||
2026-01-16 12:39:14 - mcp_services - INFO - [main.py:55] - 成功加载 6 个业务查询配置
|
||||
2026-01-16 12:39:14 - mcp_services - INFO - [main.py:123] - 本地配置: 6 条
|
||||
2026-01-16 12:39:14 - mcp_services - INFO - [main.py:165] - 成功生成 6 个 MCP 工具
|
||||
2026-01-16 12:39:17 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: OrderDelayWarningAnalysis
|
||||
2026-01-16 12:39:17 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:17 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:21 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: WorkOrderProgressAndAnomalyNodes
|
||||
2026-01-16 12:39:21 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:22 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:26 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: SupplyChainRiskWarning
|
||||
2026-01-16 12:39:26 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:26 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:30 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: OnePageDecisionBrief
|
||||
2026-01-16 12:39:30 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:30 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:33 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: EfficiencyOutputLossDashboard
|
||||
2026-01-16 12:39:33 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:33 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:39:34 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: MetricTrendAndTurningPointWarning
|
||||
2026-01-16 12:39:34 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:39:35 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "lzwcai-mcpskills-mfg-data-agent"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
description = "制造业数据智能体 - MCP server for manufacturing data intelligence with dynamic tool generation"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -115,3 +115,34 @@
|
||||
2026-01-09 20:43:35 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: HumanResourcesAnalytics
|
||||
2026-01-09 20:43:35 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-09 20:43:35 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:362] - 开始运行 MCP SQL Executor 服务器
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:313] - ============================================================
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:314] - 正在启动 MCP 服务器: lzwcai-mcpskills-analyzeOrder
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:315] - 版本: 0.1.0
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:316] - ============================================================
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:320] - 环境配置 - Database ID: 19
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:321] - 环境配置 - Datasource ID: 19
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:322] - 环境配置 - Skill ID:
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:323] - 环境配置 - Backend Base URL: http://192.168.11.24:8088
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:324] - ============================================================
|
||||
2026-01-16 12:40:03 - mcp_services - INFO - [main.py:329] - MCP 服务器已启动,等待客户端连接...
|
||||
2026-01-16 12:40:04 - mcp_services - INFO - [main.py:156] - 收到列出工具请求
|
||||
2026-01-16 12:40:04 - mcp_services - INFO - [main.py:119] - 初始化查询配置(数据源: local)...
|
||||
2026-01-16 12:40:04 - mcp_services - INFO - [main.py:55] - 成功加载 6 个业务查询配置
|
||||
2026-01-16 12:40:04 - mcp_services - INFO - [main.py:123] - 本地配置: 6 条
|
||||
2026-01-16 12:40:04 - mcp_services - INFO - [main.py:165] - 成功生成 6 个 MCP 工具
|
||||
2026-01-16 12:40:05 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: SupplierEvaluationAndSmartReplenishment
|
||||
2026-01-16 12:40:05 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:40:05 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:40:06 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: SalesBIIntelligentAnalyticsPlatform
|
||||
2026-01-16 12:40:06 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:40:06 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:40:07 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: SalesPerformanceIntelligentStatistics
|
||||
2026-01-16 12:40:07 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:40:07 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:40:08 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: FinancialAnalyticsDashboard
|
||||
2026-01-16 12:40:08 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:40:09 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
2026-01-16 12:40:11 - mcp_services - INFO - [main.py:190] - 收到工具调用请求: HumanResourcesAnalytics
|
||||
2026-01-16 12:40:11 - mcp_services - INFO - [main.py:225] - 正在调用测试SQL API...
|
||||
2026-01-16 12:40:11 - mcp_services - INFO - [main.py:227] - 测试SQL API调用成功
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "lzwcai-mcpskills-mfg-data-agentv2"
|
||||
version = "0.1.3"
|
||||
version = "0.1.5"
|
||||
description = "制造业数据智能体 - MCP server for manufacturing data intelligence with dynamic tool generation"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
|
||||
@@ -1,979 +0,0 @@
|
||||
2025-12-20 18:03:07 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': ' wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-20 18:03:07 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-20 18:03:07 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x00000155217CC380>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:03:06 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:03:07 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:03:06 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-20 18:03:07 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001552178D700>
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x00000155218D4A70>
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "Bearer wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 401, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'40f82dcb-2055-46b4-a9ae-1bbee5591306'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Content-Length', b'61'), (b'Date', b'Sat, 20 Dec 2025 10:03:10 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:03:12 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 401 "
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 401
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '40f82dcb-2055-46b4-a9ae-1bbee5591306', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'content-length': '61', 'date': 'Sat, 20 Dec 2025 10:03:10 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:182] - [API错误] 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:183] - [API错误] 响应内容: {"msg":"API Key无效","code":401,"errorCode":"UNAUTHORIZED"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - ERROR - [main.py:236] - 工作流执行失败: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 167, in execute_workflow
|
||||
response.raise_for_status()
|
||||
File "D:\anaconda3\Lib\site-packages\httpx\_models.py", line 829, in raise_for_status
|
||||
raise HTTPStatusError(message, request=request, response=self)
|
||||
httpx.HTTPStatusError: Client error '401 ' for url 'http://192.168.2.236:8088/open/workflow/execute'
|
||||
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\main.py", line 232, in handle_call_tool
|
||||
result = execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 268, in execute_workflow
|
||||
return default_client.execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 184, in execute_workflow
|
||||
raise Exception(error_msg)
|
||||
Exception: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:04:18 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-20 18:04:18 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-20 18:04:18 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000025DD0ED1F70>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:04:16 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:04:18 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:04:16 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-20 18:04:18 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x0000025DCF92FF50>
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x0000025DD0D21340>
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'62311551-e7ab-4d5d-adef-f59b1969a4cf'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:04:22 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:04:24 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '62311551-e7ab-4d5d-adef-f59b1969a4cf', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:04:22 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "e6dcd942-1592-45bb-8af7-d7d25df338ed",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 2.206175,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/e6dcd942-1592-45bb-8af7-d7d25df338ed.json"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "e6dcd942-1592-45bb-8af7-d7d25df338ed",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 2.206175,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/e6dcd942-1592-45bb-8af7-d7d25df338ed.json"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:24 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:19:55 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-23 18:19:55 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-23 18:19:55 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x000001E350E119A0>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:19:54 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:19:55 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:19:54 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-23 18:19:55 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001E350E2DC40>
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001E350DDA3C0>
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'2c574f18-2d6b-4580-bd8a-eda8c94c26eb'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:20:00 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:20:01 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '2c574f18-2d6b-4580-bd8a-eda8c94c26eb', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:20:00 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "d8ff9fc7-530c-4b77-a8a8-07d51aa79870",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 0.926932,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/d8ff9fc7-530c-4b77-a8a8-07d51aa79870.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "d8ff9fc7-530c-4b77-a8a8-07d51aa79870",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 0.926932,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/d8ff9fc7-530c-4b77-a8a8-07d51aa79870.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:01 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:24:44 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:275] - ==================================================
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:276] - Workflow MCP Server 启动
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:277] - ==================================================
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:285] - 使用模式: api
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-23 18:24:44 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-23 18:24:44 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x000001B44A89F380>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:24:43 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:24:44 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:24:43 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:293] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-23 18:24:44 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001B44A911070>
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001B44A8D15E0>
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'282e2c5e-e68e-48f5-bfdb-1e04ffc18682'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:24:48 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:24:49 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '282e2c5e-e68e-48f5-bfdb-1e04ffc18682', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:24:48 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "1f154317-ca19-4073-b7b5-a2b2beb38a3f",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 1.146157,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/1f154317-ca19-4073-b7b5-a2b2beb38a3f.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "1f154317-ca19-4073-b7b5-a2b2beb38a3f",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 1.146157,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/1f154317-ca19-4073-b7b5-a2b2beb38a3f.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:294] - 提取 final_output 最后节点成功: key=f54a21ba-e3a3-461e-9a6b-e952087f4a5b
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:295] - 提取结果: {"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"}
|
||||
2025-12-23 18:24:49 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
@@ -1,506 +0,0 @@
|
||||
2025-12-23 18:19:55 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-23 18:19:55 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-23 18:19:55 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x000001E350E119A0>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:19:54 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:19:55 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:19:55 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:19:54 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-23 18:19:55 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-23 18:19:55 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-23 18:19:55 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001E350E2DC40>
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-23 18:19:56 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-23 18:19:56 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001E350DDA3C0>
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-23 18:20:00 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:00 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:20:00 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'2c574f18-2d6b-4580-bd8a-eda8c94c26eb'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:20:00 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:20:01 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:20:01 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '2c574f18-2d6b-4580-bd8a-eda8c94c26eb', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:20:00 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "d8ff9fc7-530c-4b77-a8a8-07d51aa79870",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 0.926932,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/d8ff9fc7-530c-4b77-a8a8-07d51aa79870.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-23 18:20:01 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "d8ff9fc7-530c-4b77-a8a8-07d51aa79870",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 0.926932,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!看起来你可能感兴趣于某方面,但还没具体说明?如果需要帮助,尽管告诉我,我很乐意帮忙解答或讨论各种话题!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/d8ff9fc7-530c-4b77-a8a8-07d51aa79870.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:20:01 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:24:44 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:275] - ==================================================
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:276] - Workflow MCP Server 启动
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:277] - ==================================================
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:285] - 使用模式: api
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-23 18:24:44 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-23 18:24:44 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x000001B44A89F380>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:24:43 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:24:44 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:24:44 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:24:43 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-23 18:24:44 - lzwcai_workflow_to_mcp.main - INFO - [main.py:293] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-23 18:24:44 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-23 18:24:44 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001B44A911070>
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-23 18:24:45 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-23 18:24:45 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001B44A8D15E0>
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-23 18:24:48 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 18:31:56",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "3123123123-workflow服务_weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"问题\",\"type\":\"string\",\"format\":\"paragraph\",\"maxLength\":3000}},\"required\":[\"query\"]}",
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:48 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-23 18:24:48 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'282e2c5e-e68e-48f5-bfdb-1e04ffc18682'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Tue, 23 Dec 2025 10:24:48 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-23 18:24:49 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-23 18:24:49 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '282e2c5e-e68e-48f5-bfdb-1e04ffc18682', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Tue, 23 Dec 2025 10:24:48 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "1f154317-ca19-4073-b7b5-a2b2beb38a3f",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 1.146157,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/1f154317-ca19-4073-b7b5-a2b2beb38a3f.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "1f154317-ca19-4073-b7b5-a2b2beb38a3f",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 1.146157,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/1f154317-ca19-4073-b7b5-a2b2beb38a3f.json"
|
||||
}
|
||||
}
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:294] - 提取 final_output 最后节点成功: key=f54a21ba-e3a3-461e-9a6b-e952087f4a5b
|
||||
2025-12-23 18:24:49 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:295] - 提取结果: {"q": "你好!很高兴见到你。我注意到你用了特别的表情符号,是想表达亲切吗?🤗 如果你有任何问题或需要帮助,随时告诉我哦。今天想聊些什么呢?"}
|
||||
2025-12-23 18:24:49 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
@@ -1,473 +0,0 @@
|
||||
2025-12-20 18:03:07 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'Bearer wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-20 18:03:07 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-20 18:03:07 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x00000155217CC380>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:03:06 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:03:07 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:03:07 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:03:06 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-20 18:03:07 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-20 18:03:07 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-20 18:03:07 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x000001552178D700>
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-20 18:03:08 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-20 18:03:08 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x00000155218D4A70>
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "Bearer wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 401, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'40f82dcb-2055-46b4-a9ae-1bbee5591306'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Content-Length', b'61'), (b'Date', b'Sat, 20 Dec 2025 10:03:10 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:03:12 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 401 "
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:03:12 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 401
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '40f82dcb-2055-46b4-a9ae-1bbee5591306', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'content-length': '61', 'date': 'Sat, 20 Dec 2025 10:03:10 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:182] - [API错误] 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:183] - [API错误] 响应内容: {"msg":"API Key无效","code":401,"errorCode":"UNAUTHORIZED"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - ERROR - [main.py:236] - 工作流执行失败: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 167, in execute_workflow
|
||||
response.raise_for_status()
|
||||
File "D:\anaconda3\Lib\site-packages\httpx\_models.py", line 829, in raise_for_status
|
||||
raise HTTPStatusError(message, request=request, response=self)
|
||||
httpx.HTTPStatusError: Client error '401 ' for url 'http://192.168.2.236:8088/open/workflow/execute'
|
||||
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\main.py", line 232, in handle_call_tool
|
||||
result = execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 268, in execute_workflow
|
||||
return default_client.execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 184, in execute_workflow
|
||||
raise Exception(error_msg)
|
||||
Exception: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:04:18 - root - INFO - [logger_config.py:117] - 日志系统初始化完成 - 日志目录: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\logs
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:154] - Initializing server 'workflow_mcp_server'
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:380] - Registering handler for ListToolsRequest
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:441] - Registering handler for CallToolRequest
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:272] - ==================================================
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:273] - Workflow MCP Server 启动
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:274] - ==================================================
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:279] - 命令行参数: {'mode': 'api', 'json_path': None, 'workflow_id': None}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:282] - 使用模式: api
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:103] - ApiLoader 初始化,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:111] - 开始从 API 加载工作流配置,工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:56] - [客户端初始化] base_url=http://192.168.2.236:8088
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:57] - [客户端初始化] token=wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:58] - [客户端初始化] execute_timeout=300.0s
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:89] - [API请求] GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:90] - [API请求] Headers: {'X-API-Key': 'wf_buh230o9iaea4n6aefsddcexa7p27ydl'}
|
||||
2025-12-20 18:04:18 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.started host='192.168.2.236' port=8088 local_address=None timeout=30.0 socket_options=None
|
||||
2025-12-20 18:04:18 - httpcore.connection - DEBUG - [_trace.py:45] - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000025DD0ED1F70>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:04:16 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:04:18 - httpx - INFO - [_client.py:1025] - HTTP Request: GET http://192.168.2.236:8088/system/workflowManage/getByWorkflowId/2002300699510763521 "HTTP/1.1 200 "
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'GET']>
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:04:18 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:97] - [API响应] HTTP 200
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:98] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:04:16 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:103] - [API响应] 获取工作流配置成功: workflow_id=2002300699510763521
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:104] - [API响应] Body: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:116] - API 响应原始数据: {
|
||||
"msg": "查询成功",
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
}
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:124] - API 响应 data 字段: [
|
||||
{
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
]
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:135] - 从 API 加载工作流配置成功,工作流ID: 2002300699510763521, 配置数量: 1
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:165] - 已加载 1 个工具配置
|
||||
2025-12-20 18:04:18 - lzwcai_workflow_to_mcp.main - INFO - [main.py:290] - 开始运行 MCP Server (stdio 模式)
|
||||
2025-12-20 18:04:18 - asyncio - DEBUG - [proactor_events.py:634] - Using proactor: IocpProactor
|
||||
2025-12-20 18:04:18 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: root=InitializedNotification(method='notifications/initialized', params=None, jsonrpc='2.0')
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x0000025DCF92FF50>
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type ListToolsRequest
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type ListToolsRequest
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - INFO - [main.py:171] - 收到 ListTools 请求,当前配置数量: 1
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:179] - 处理工具配置: name=weimingminggongdefangshizuoliu001_91bc43ee, description=3123123123...
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:183] - 工具 weimingminggongdefangshizuoliu001_91bc43ee 的 inputSchema: {"type": "object", "properties": {"query": {"description": "问题", "type": "string", "format": "paragraph", "maxLength": 3000}}, "required": ["query"]}
|
||||
2025-12-20 18:04:19 - lzwcai_workflow_to_mcp.main - INFO - [main.py:193] - ListTools 响应: 返回 1 个工具
|
||||
2025-12-20 18:04:19 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - DEBUG - [server.py:582] - Received message: <mcp.shared.session.RequestResponder object at 0x0000025DD0D21340>
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - INFO - [server.py:619] - Processing request of type CallToolRequest
|
||||
2025-12-20 18:04:22 - mcp.server.lowlevel.server - DEBUG - [server.py:621] - Dispatching request of type CallToolRequest
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:203] - 收到 CallTool 请求: name=weimingminggongdefangshizuoliu001_91bc43ee, arguments={"query": "你好啊"}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:216] - 找到工具配置: {
|
||||
"id": "2002300699812753409",
|
||||
"createBy": "yy8z9",
|
||||
"createTime": "2025-12-20 16:51:02",
|
||||
"updateBy": "yy8z9",
|
||||
"updateTime": "2025-12-20 17:59:26",
|
||||
"serviceId": "2002300699804364801",
|
||||
"uniqueName": "未命名工的方式作流001",
|
||||
"name": "weimingminggongdefangshizuoliu001_91bc43ee",
|
||||
"description": "3123123123",
|
||||
"visualizable": 0,
|
||||
"toolPrompt": null,
|
||||
"toolType": "api",
|
||||
"datasourceId": null,
|
||||
"sqlTemplate": null,
|
||||
"sqlParams": "[{\"type\":\"paragraph\",\"name\":\"query\",\"displayName\":\"问题\",\"maxLength\":3000,\"defaultValue\":\"\",\"required\":true}]",
|
||||
"resultType": null,
|
||||
"sourceType": null,
|
||||
"trainingTaskId": null,
|
||||
"tableMetadataIds": null,
|
||||
"executionCount": 0,
|
||||
"visualizationConfigs": null,
|
||||
"inputJsonSchema": null,
|
||||
"outputJsonSchema": null,
|
||||
"lastExecutionTime": null
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:220] - 使用工作流ID: 2002300699510763521
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.main - INFO - [main.py:228] - 执行工作流请求数据: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:150] - [执行工作流] URL: http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:151] - [执行工作流] Token: wf_buh230o9iaea4n6aefsddcexa7p27ydl
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:152] - [执行工作流] Headers: {"X-API-Key": "wf_buh230o9iaea4n6aefsddcexa7p27ydl", "Content-Type": "application/json", "Accept": "*/*"}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:153] - [执行工作流] 请求参数: {
|
||||
"workflowId": "2002300699510763521",
|
||||
"inputs": {
|
||||
"query": "你好啊"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:22 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:154] - [执行工作流] 超时时间: 300.0s
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_headers.complete
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - send_request_body.complete
|
||||
2025-12-20 18:04:22 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Trace-Id', b'62311551-e7ab-4d5d-adef-f59b1969a4cf'), (b'X-RateLimit-Limit', b'100'), (b'X-RateLimit-Remaining', b'99'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Date', b'Sat, 20 Dec 2025 10:04:22 GMT'), (b'Keep-Alive', b'timeout=60'), (b'Connection', b'keep-alive')])
|
||||
2025-12-20 18:04:24 - httpx - INFO - [_client.py:1025] - HTTP Request: POST http://192.168.2.236:8088/open/workflow/execute "HTTP/1.1 200 "
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.started request=<Request [b'POST']>
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - receive_response_body.complete
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.started
|
||||
2025-12-20 18:04:24 - httpcore.http11 - DEBUG - [_trace.py:45] - response_closed.complete
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:164] - [API响应] HTTP 200
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:165] - [API响应] Headers: {'vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'x-trace-id': '62311551-e7ab-4d5d-adef-f59b1969a4cf', 'x-ratelimit-limit': '100', 'x-ratelimit-remaining': '99', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Sat, 20 Dec 2025 10:04:22 GMT', 'keep-alive': 'timeout=60', 'connection': 'keep-alive'}
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - INFO - [api_client.py:170] - [API响应] 执行工作流成功
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.utils.api_client - DEBUG - [api_client.py:171] - [API响应] Body: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "e6dcd942-1592-45bb-8af7-d7d25df338ed",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 2.206175,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/e6dcd942-1592-45bb-8af7-d7d25df338ed.json"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.main - INFO - [main.py:233] - 工作流执行成功: 2002300699510763521
|
||||
2025-12-20 18:04:24 - lzwcai_workflow_to_mcp.main - DEBUG - [main.py:234] - 工作流执行结果: {
|
||||
"msg": "操作成功",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"execution_id": "e6dcd942-1592-45bb-8af7-d7d25df338ed",
|
||||
"workflow_id": "3dc9d954-c270-4bbf-aa3d-5945c6acb2f5",
|
||||
"status": "success",
|
||||
"duration": 2.206175,
|
||||
"nodes_executed": 3,
|
||||
"errors_count": 0,
|
||||
"final_output": {
|
||||
"da9400b0-4754-4842-8a5e-dc20e2868cc6": {
|
||||
"query": "你好啊"
|
||||
},
|
||||
"a480a344-7fa9-439b-8db6-79b136a79736": {
|
||||
"text": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
},
|
||||
"f54a21ba-e3a3-461e-9a6b-e952087f4a5b": {
|
||||
"q": "你好呀!✨ 很高兴见到你!今天过得怎么样呀?希望你度过了愉快的一天。我今天刚整理完知识库,准备了很多有趣的话题和实用的信息,希望能和你一起探讨、学习。不知道你今天想聊些什么呢?无论是有趣的故事、需要解决的问题,还是纯粹想聊聊日常,我都很乐意陪伴你聊天哦!😊"
|
||||
}
|
||||
},
|
||||
"error": null,
|
||||
"log_id": "logs/3dc9d954-c270-4bbf-aa3d-5945c6acb2f5/e6dcd942-1592-45bb-8af7-d7d25df338ed.json"
|
||||
}
|
||||
}
|
||||
2025-12-20 18:04:24 - mcp.server.lowlevel.server - DEBUG - [server.py:662] - Response sent
|
||||
@@ -1,23 +0,0 @@
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:182] - [API错误] 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.utils.api_client - ERROR - [api_client.py:183] - [API错误] 响应内容: {"msg":"API Key无效","code":401,"errorCode":"UNAUTHORIZED"}
|
||||
2025-12-20 18:03:12 - lzwcai_workflow_to_mcp.main - ERROR - [main.py:236] - 工作流执行失败: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 167, in execute_workflow
|
||||
response.raise_for_status()
|
||||
File "D:\anaconda3\Lib\site-packages\httpx\_models.py", line 829, in raise_for_status
|
||||
raise HTTPStatusError(message, request=request, response=self)
|
||||
httpx.HTTPStatusError: Client error '401 ' for url 'http://192.168.2.236:8088/open/workflow/execute'
|
||||
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\main.py", line 232, in handle_call_tool
|
||||
result = execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 268, in execute_workflow
|
||||
return default_client.execute_workflow(request_data)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai_workflow_to_mcp\lzwcai_workflow_to_mcp\utils\api_client.py", line 184, in execute_workflow
|
||||
raise Exception(error_msg)
|
||||
Exception: 执行工作流API请求失败 (HTTP 401): http://192.168.2.236:8088/open/workflow/execute
|
||||
@@ -10,7 +10,10 @@ from .api_client import (
|
||||
process_workflow_response,
|
||||
get_default_client,
|
||||
DEFAULT_TIMEOUT,
|
||||
WORKFLOW_EXECUTE_TIMEOUT
|
||||
WORKFLOW_EXECUTE_TIMEOUT,
|
||||
DEFAULT_POLLING_INTERVAL,
|
||||
DEFAULT_MAX_POLL_COUNT,
|
||||
DEFAULT_MAX_ERROR_COUNT,
|
||||
)
|
||||
from .env_config import get_workflow_id, get_backend_base_url, get_env_config, set_env_variable
|
||||
|
||||
@@ -26,6 +29,9 @@ __all__ = [
|
||||
'get_default_client',
|
||||
'DEFAULT_TIMEOUT',
|
||||
'WORKFLOW_EXECUTE_TIMEOUT',
|
||||
'DEFAULT_POLLING_INTERVAL',
|
||||
'DEFAULT_MAX_POLL_COUNT',
|
||||
'DEFAULT_MAX_ERROR_COUNT',
|
||||
'get_workflow_id',
|
||||
'get_backend_base_url',
|
||||
'get_env_config',
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,9 @@
|
||||
|
||||
import httpx
|
||||
import json
|
||||
from typing import Dict, Any, Optional, List
|
||||
import os
|
||||
import time
|
||||
from typing import Dict, Any, Optional, List, Tuple
|
||||
|
||||
try:
|
||||
from .env_config import get_backend_base_url, get_workflow_execute_key
|
||||
@@ -18,7 +20,64 @@ logger = get_logger(__name__)
|
||||
|
||||
# 默认超时配置(秒)
|
||||
DEFAULT_TIMEOUT = 30.0 # 普通请求超时
|
||||
WORKFLOW_EXECUTE_TIMEOUT = 300.0 # 工作流执行超时(5分钟)
|
||||
WORKFLOW_EXECUTE_TIMEOUT = 600.0 # 工作流执行超时(10分钟,参考 workflow-execution-api.md)
|
||||
|
||||
# 异步轮询默认配置(参考 workflow-execution-api.md)
|
||||
DEFAULT_POLLING_INTERVAL = 1.0
|
||||
DEFAULT_MAX_POLL_COUNT = 120
|
||||
DEFAULT_MAX_ERROR_COUNT = 3
|
||||
|
||||
|
||||
def _get_polling_config() -> Tuple[float, int, int]:
|
||||
"""
|
||||
获取轮询配置(允许用环境变量覆盖)
|
||||
|
||||
Env:
|
||||
- workflowPollingIntervalSeconds: float, 默认 1
|
||||
- workflowMaxPollCount: int, 默认 120
|
||||
- workflowMaxErrorCount: int, 默认 3
|
||||
"""
|
||||
try:
|
||||
interval = float(os.environ.get("workflowPollingIntervalSeconds", str(DEFAULT_POLLING_INTERVAL)))
|
||||
except ValueError:
|
||||
interval = DEFAULT_POLLING_INTERVAL
|
||||
|
||||
try:
|
||||
max_polls = int(os.environ.get("workflowMaxPollCount", str(DEFAULT_MAX_POLL_COUNT)))
|
||||
except ValueError:
|
||||
max_polls = DEFAULT_MAX_POLL_COUNT
|
||||
|
||||
try:
|
||||
max_errors = int(os.environ.get("workflowMaxErrorCount", str(DEFAULT_MAX_ERROR_COUNT)))
|
||||
except ValueError:
|
||||
max_errors = DEFAULT_MAX_ERROR_COUNT
|
||||
|
||||
# 避免被错误配置成 0 或负数
|
||||
interval = interval if interval > 0 else DEFAULT_POLLING_INTERVAL
|
||||
max_polls = max_polls if max_polls > 0 else DEFAULT_MAX_POLL_COUNT
|
||||
max_errors = max_errors if max_errors > 0 else DEFAULT_MAX_ERROR_COUNT
|
||||
|
||||
return interval, max_polls, max_errors
|
||||
|
||||
|
||||
def _extract_async_ids(execute_response: Dict[str, Any]) -> Optional[Tuple[str, str, str]]:
|
||||
"""
|
||||
从执行接口响应中提取 (status, execution_id, workflow_id)
|
||||
兼容 snake_case / camelCase。
|
||||
"""
|
||||
if not isinstance(execute_response, dict):
|
||||
return None
|
||||
data = execute_response.get("data")
|
||||
if not isinstance(data, dict):
|
||||
return None
|
||||
|
||||
status = data.get("status")
|
||||
execution_id = data.get("execution_id") or data.get("executionId")
|
||||
workflow_id = data.get("workflow_id") or data.get("workflowId")
|
||||
|
||||
if status and execution_id and workflow_id:
|
||||
return str(status), str(execution_id), str(workflow_id)
|
||||
return None
|
||||
|
||||
|
||||
class WorkflowAPIClient:
|
||||
@@ -170,7 +229,20 @@ class WorkflowAPIClient:
|
||||
logger.info(f"[API响应] 执行工作流成功")
|
||||
logger.debug(f"[API响应] Body: {json.dumps(data, ensure_ascii=False, indent=2)}")
|
||||
|
||||
return data
|
||||
# 兼容:如果服务端返回 async 的 execution_id/workflow_id,则按文档轮询状态接口直到结束
|
||||
async_info = _extract_async_ids(data)
|
||||
if async_info is None:
|
||||
return data
|
||||
|
||||
status, execution_id, workflow_id = async_info
|
||||
if status not in ("pending", "running"):
|
||||
# 有些服务端可能直接返回 success/failed 但仍带 execution_id
|
||||
return data
|
||||
|
||||
logger.info(
|
||||
f"[执行工作流] 检测到异步执行: status={status}, execution_id={execution_id}, workflow_id={workflow_id}"
|
||||
)
|
||||
return self.poll_workflow_result(execution_id=execution_id, workflow_id=workflow_id)
|
||||
|
||||
except httpx.TimeoutException:
|
||||
error_msg = f"执行工作流API请求超时: {url}"
|
||||
@@ -193,6 +265,88 @@ class WorkflowAPIClient:
|
||||
logger.error(f"[API错误] {error_msg}", exc_info=True)
|
||||
raise Exception(error_msg)
|
||||
|
||||
def get_workflow_execute_status(self, execution_id: str, workflow_id: str) -> Dict[str, Any]:
|
||||
"""
|
||||
查询异步执行状态
|
||||
|
||||
GET /open/workflow/execute/status/{executionId}?workflowId={workflowId}
|
||||
"""
|
||||
url = f"{self.base_url}/open/workflow/status/{execution_id}"
|
||||
try:
|
||||
logger.info(f"[API请求] GET {url}")
|
||||
response = self.client.get(
|
||||
url,
|
||||
headers=self._get_headers(),
|
||||
params={"workflowId": workflow_id},
|
||||
)
|
||||
logger.info(f"[API响应] HTTP {response.status_code}")
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
logger.debug(f"[API响应] Body: {json.dumps(data, ensure_ascii=False, indent=2)}")
|
||||
return data
|
||||
except httpx.TimeoutException:
|
||||
error_msg = f"查询工作流执行状态超时: {url}"
|
||||
logger.error(f"[API错误] {error_msg}")
|
||||
raise Exception(error_msg)
|
||||
except httpx.HTTPStatusError as e:
|
||||
error_msg = f"查询工作流执行状态失败 (HTTP {e.response.status_code}): {url}"
|
||||
logger.error(f"[API错误] {error_msg}")
|
||||
logger.error(f"[API错误] 响应内容: {e.response.text}")
|
||||
raise Exception(error_msg)
|
||||
except httpx.RequestError as e:
|
||||
error_msg = f"查询工作流执行状态请求异常: {url}, 错误: {str(e)}"
|
||||
logger.error(f"[API错误] {error_msg}")
|
||||
raise Exception(error_msg)
|
||||
except Exception as e:
|
||||
error_msg = f"处理查询执行状态响应时出错: {str(e)}"
|
||||
logger.error(f"[API错误] {error_msg}", exc_info=True)
|
||||
raise Exception(error_msg)
|
||||
|
||||
def poll_workflow_result(self, execution_id: str, workflow_id: str) -> Dict[str, Any]:
|
||||
"""轮询直到工作流执行完成(success/failed)或超时"""
|
||||
interval, max_polls, max_errors = _get_polling_config()
|
||||
error_count = 0
|
||||
|
||||
logger.info(
|
||||
f"[轮询] 开始轮询执行状态: execution_id={execution_id}, workflow_id={workflow_id}, "
|
||||
f"interval={interval}s, max_polls={max_polls}, max_errors={max_errors}"
|
||||
)
|
||||
|
||||
for i in range(max_polls):
|
||||
try:
|
||||
resp = self.get_workflow_execute_status(execution_id=execution_id, workflow_id=workflow_id)
|
||||
if resp.get("code") != 200:
|
||||
error_count += 1
|
||||
logger.warning(f"[轮询] 状态接口返回非200(code={resp.get('code')}), error_count={error_count}")
|
||||
if error_count >= max_errors:
|
||||
raise Exception(f"轮询连续错误次数过多: code={resp.get('code')}, msg={resp.get('msg')}")
|
||||
time.sleep(interval)
|
||||
continue
|
||||
|
||||
error_count = 0
|
||||
data = resp.get("data") or {}
|
||||
status = data.get("status")
|
||||
|
||||
logger.info(f"[轮询] 第{i+1}/{max_polls}次: status={status}")
|
||||
|
||||
if status in ("pending", "running"):
|
||||
time.sleep(interval)
|
||||
continue
|
||||
if status in ("success", "failed"):
|
||||
return resp
|
||||
|
||||
# 兜底:未知状态
|
||||
raise Exception(f"未知执行状态: {status}")
|
||||
|
||||
except Exception as e:
|
||||
error_count += 1
|
||||
logger.warning(f"[轮询] 轮询异常: {e}, error_count={error_count}")
|
||||
if error_count >= max_errors:
|
||||
raise
|
||||
time.sleep(interval)
|
||||
|
||||
raise Exception("轮询超时:超过最大轮询次数仍未完成")
|
||||
|
||||
def close(self):
|
||||
"""关闭HTTP客户端"""
|
||||
if self._client is not None:
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
# 工作流执行接口文档
|
||||
|
||||
## 概述
|
||||
工作流执行分为**同步执行**和**异步执行**两种模式,通过 `async` 参数控制。
|
||||
|
||||
---
|
||||
|
||||
## 1. 调试执行接口
|
||||
|
||||
### 接口信息
|
||||
- **URL**: `POST /open/workflow/execute`
|
||||
- **超时**: 600000ms (10分钟)
|
||||
|
||||
### 请求参数
|
||||
```json
|
||||
{
|
||||
"workflow": {
|
||||
"nodes": [...],
|
||||
"edges": [...]
|
||||
},
|
||||
"inputs": {
|
||||
"param1": "value1",
|
||||
"param2": "value2"
|
||||
},
|
||||
"saveLog": false,
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
|------|------|------|------|
|
||||
| workflow | Object | 是 | 工作流配置(节点和边) |
|
||||
| inputs | Object | 否 | 开始节点的输入参数 |
|
||||
| saveLog | Boolean | 否 | 是否保存执行日志 |
|
||||
| async | Boolean | 否 | 是否异步执行(默认 false) |
|
||||
|
||||
---
|
||||
|
||||
## 2. 响应处理
|
||||
|
||||
### 2.1 同步执行响应 (async=false)
|
||||
直接返回完整执行结果:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"data": {
|
||||
"success": true,
|
||||
"status": "success",
|
||||
"duration": 2.5,
|
||||
"nodes_executed": 5,
|
||||
"errors_count": 0,
|
||||
"final_output": {...},
|
||||
"execution_history": [
|
||||
{
|
||||
"node_id": "node_1",
|
||||
"node_type": "start",
|
||||
"status": "success",
|
||||
"inputs": {...},
|
||||
"outputs": {...},
|
||||
"error": null,
|
||||
"duration": 0.1,
|
||||
"timestamp": "2024-01-20T10:00:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.2 异步执行响应 (async=true)
|
||||
返回执行 ID,需要轮询查询状态:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"data": {
|
||||
"status": "pending",
|
||||
"execution_id": "exec_123456",
|
||||
"workflow_id": "wf_789"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. 异步执行状态查询
|
||||
|
||||
### 接口信息
|
||||
- **URL**: `GET /open/workflow/status/{executionId}?workflowId={workflowId}`
|
||||
|
||||
### 请求参数
|
||||
| 参数 | 位置 | 类型 | 必填 | 说明 |
|
||||
|------|------|------|------|------|
|
||||
| executionId | Path | String | 是 | 执行ID |
|
||||
| workflowId | Query | String | 是 | 工作流ID |
|
||||
|
||||
### 响应数据
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"data": {
|
||||
"status": "success",
|
||||
"success": true,
|
||||
"execution_id": "exec_123456",
|
||||
"workflow_id": "wf_789",
|
||||
"duration": 2.5,
|
||||
"nodes_executed": 5,
|
||||
"errors_count": 0,
|
||||
"final_output": {...},
|
||||
"execution_history": [...]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 状态值说明
|
||||
| 状态 | 说明 | 处理方式 |
|
||||
|------|------|----------|
|
||||
| pending | 等待执行 | 继续轮询 |
|
||||
| running | 执行中 | 继续轮询 |
|
||||
| success | 执行成功 | 停止轮询,显示结果 |
|
||||
| failed | 执行失败 | 停止轮询,显示错误 |
|
||||
|
||||
---
|
||||
|
||||
## 4. 轮询策略
|
||||
|
||||
### 前端实现参数
|
||||
```javascript
|
||||
const POLLING_INTERVAL = 1000; // 轮询间隔:1秒
|
||||
const MAX_POLL_COUNT = 120; // 最大轮询次数:2分钟
|
||||
const MAX_ERROR_COUNT = 3; // 最大连续错误次数
|
||||
```
|
||||
|
||||
### 轮询逻辑
|
||||
1. 提交异步执行请求,获取 `execution_id` 和 `workflow_id`
|
||||
2. 每隔 1 秒调用状态查询接口
|
||||
3. 根据返回的 `status` 判断:
|
||||
- `pending/running`: 继续轮询
|
||||
- `success/failed`: 停止轮询,处理结果
|
||||
4. 超过 120 次轮询或连续 3 次错误,停止轮询
|
||||
|
||||
---
|
||||
|
||||
## 5. Python 实现示例
|
||||
|
||||
### 5.1 同步执行
|
||||
```python
|
||||
import requests
|
||||
|
||||
def execute_workflow_sync(workflow_config, inputs=None):
|
||||
"""同步执行工作流"""
|
||||
url = "http://your-api/api/system/workflowManage/debug"
|
||||
|
||||
payload = {
|
||||
"workflow": workflow_config,
|
||||
"inputs": inputs or {},
|
||||
"saveLog": False,
|
||||
"async": False
|
||||
}
|
||||
|
||||
response = requests.post(url, json=payload, timeout=600)
|
||||
result = response.json()
|
||||
|
||||
if result["code"] == 200:
|
||||
return result["data"]
|
||||
else:
|
||||
raise Exception(f"执行失败: {result.get('msg')}")
|
||||
```
|
||||
|
||||
### 5.2 异步执行 + 轮询
|
||||
```python
|
||||
import requests
|
||||
import time
|
||||
|
||||
def execute_workflow_async(workflow_config, inputs=None):
|
||||
"""异步执行工作流并轮询结果"""
|
||||
# 1. 提交异步执行
|
||||
url = "http://your-api/api/system/workflowManage/debug"
|
||||
payload = {
|
||||
"workflow": workflow_config,
|
||||
"inputs": inputs or {},
|
||||
"saveLog": False,
|
||||
"async": True
|
||||
}
|
||||
|
||||
response = requests.post(url, json=payload, timeout=600)
|
||||
result = response.json()
|
||||
|
||||
if result["code"] != 200:
|
||||
raise Exception(f"提交失败: {result.get('msg')}")
|
||||
|
||||
execution_id = result["data"]["execution_id"]
|
||||
workflow_id = result["data"]["workflow_id"]
|
||||
|
||||
# 2. 轮询执行状态
|
||||
status_url = f"http://your-api/api/system/workflowManage/status/{execution_id}"
|
||||
params = {"workflowId": workflow_id}
|
||||
|
||||
max_polls = 120
|
||||
poll_interval = 1
|
||||
error_count = 0
|
||||
|
||||
for i in range(max_polls):
|
||||
try:
|
||||
response = requests.get(status_url, params=params)
|
||||
result = response.json()
|
||||
|
||||
if result["code"] == 200:
|
||||
error_count = 0 # 重置错误计数
|
||||
data = result["data"]
|
||||
status = data["status"]
|
||||
|
||||
if status == "success":
|
||||
return data
|
||||
elif status == "failed":
|
||||
raise Exception(f"执行失败: {data.get('error')}")
|
||||
elif status in ["pending", "running"]:
|
||||
time.sleep(poll_interval)
|
||||
continue
|
||||
else:
|
||||
raise Exception(f"未知状态: {status}")
|
||||
else:
|
||||
error_count += 1
|
||||
if error_count >= 3:
|
||||
raise Exception("连续错误次数过多")
|
||||
time.sleep(poll_interval)
|
||||
|
||||
except requests.RequestException as e:
|
||||
error_count += 1
|
||||
if error_count >= 3:
|
||||
raise Exception(f"网络异常: {str(e)}")
|
||||
time.sleep(poll_interval)
|
||||
|
||||
raise Exception("执行超时")
|
||||
```
|
||||
|
||||
### 5.3 完整使用示例
|
||||
```python
|
||||
# 工作流配置
|
||||
workflow_config = {
|
||||
"nodes": [
|
||||
{
|
||||
"id": "start_1",
|
||||
"type": "start",
|
||||
"data": {
|
||||
"config": {
|
||||
"inputs": [
|
||||
{"name": "text", "type": "string", "required": True}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
# ... 其他节点
|
||||
],
|
||||
"edges": [
|
||||
{"source": "start_1", "target": "node_2"}
|
||||
]
|
||||
}
|
||||
|
||||
# 输入参数
|
||||
inputs = {
|
||||
"text": "Hello World"
|
||||
}
|
||||
|
||||
# 同步执行
|
||||
try:
|
||||
result = execute_workflow_sync(workflow_config, inputs)
|
||||
print("执行成功:", result)
|
||||
except Exception as e:
|
||||
print("执行失败:", e)
|
||||
|
||||
# 异步执行
|
||||
try:
|
||||
result = execute_workflow_async(workflow_config, inputs)
|
||||
print("执行成功:", result)
|
||||
except Exception as e:
|
||||
print("执行失败:", e)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. 响应数据结构
|
||||
|
||||
### execution_history 节点执行记录
|
||||
```python
|
||||
{
|
||||
"node_id": "node_1", # 节点ID
|
||||
"node_type": "llm", # 节点类型
|
||||
"status": "success", # 执行状态
|
||||
"inputs": {...}, # 输入参数
|
||||
"outputs": {...}, # 输出结果
|
||||
"error": None, # 错误信息
|
||||
"duration": 1.2, # 执行耗时(秒)
|
||||
"timestamp": "2024-01-20..." # 时间戳
|
||||
}
|
||||
```
|
||||
|
||||
### 节点类型枚举
|
||||
- `start`: 开始节点
|
||||
- `end`: 结束节点
|
||||
- `llm`: 大模型节点
|
||||
- `code`: 代码节点
|
||||
- `condition`: 条件分支
|
||||
- `loop`: 循环节点
|
||||
- `http`: HTTP请求
|
||||
- `knowledge`: 知识库
|
||||
- `agent`: 智能体
|
||||
- `tool`: 工具节点
|
||||
- `variable`: 变量节点
|
||||
- `template`: 模板节点
|
||||
- `subflow`: 子流程
|
||||
|
||||
---
|
||||
|
||||
## 7. 注意事项
|
||||
|
||||
1. **超时设置**: 调试接口超时时间为 10 分钟,适合长时间运行的工作流
|
||||
2. **异步推荐**: 对于复杂工作流,建议使用异步模式避免超时
|
||||
3. **轮询频率**: 建议 1 秒轮询一次,避免过于频繁
|
||||
4. **错误处理**: 需要处理网络异常、超时、连续错误等情况
|
||||
5. **日志保存**: `saveLog` 参数控制是否保存执行日志到数据库
|
||||
@@ -7,8 +7,8 @@ import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
# 设置环境变量
|
||||
os.environ["workflowId"] = "2002300699510763521"
|
||||
os.environ["workflowExecuteKey"] = "wf_buh230o9iaea4n6aefsddcexa7p27ydl"
|
||||
os.environ["workflowId"] = "2005892514011795457"
|
||||
os.environ["workflowExecuteKey"] = "wf_ce270212b2ee45ab9c81714a7c243c56"
|
||||
os.environ["backendBaseUrl"] = "http://192.168.2.236:8088"
|
||||
|
||||
# Import and run the actual MCP server
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "lzwcai-workflow-to-mcp"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
description = "MCP server for executing business SQL queries with dynamic tool generation"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
|
||||
Reference in New Issue
Block a user