From 1ecc01a7c8a08b926997023e326f5de0a122d2af Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Dec 2025 14:49:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84step=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/mcp_agent/prompt.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/scheduler/mcp_agent/prompt.py b/apps/scheduler/mcp_agent/prompt.py index d030c6f5..63fea6ad 100644 --- a/apps/scheduler/mcp_agent/prompt.py +++ b/apps/scheduler/mcp_agent/prompt.py @@ -1133,7 +1133,7 @@ GEN_STEP: dict[LanguageType, str] = { ```json { "tool_id": "DuDlgP", - "description": "扫描ip为192.168.1.1的MySQL数据库,端口为3306,用户名为root,密码为password的数据库性能", + "description": "使用mysql分析工具扫描host为192.168.1.1端口为3306的mysql数据库性能" } ``` # 样例二 @@ -1167,7 +1167,7 @@ GEN_STEP: dict[LanguageType, str] = { ```json { "tool_id": "pcSEsx", - "description": "规划从杭州到北京的综合公共交通方式的通勤方案" + "description": "使用路径规划工具,规划一条从杭州到北京的综合公共交通通勤方案,基于历史上下文获取杭州和北京的经纬度坐标" } ``` # 现在开始生成步骤: @@ -1208,16 +1208,16 @@ GEN_STEP: dict[LanguageType, str] = { - Result: `{"result": "success"}` # Tools - - mcp_tool_1 mysql_analyzer; used for analyzing database performance. - - mcp_tool_2 File storage tool; used for storing files. - - mcp_tool_3 MongoDB tool; used for operating MongoDB databases. + - DuDlgP mysql_analyzer; used for analyzing database performance. + - ADsxSX File storage tool; used for storing files. + - ySASDZ MongoDB tool; used for operating MongoDB databases. - Final This step completes the plan execution and the result is used as the final result. # Output ```json { - "tool_id": "mcp_tool_1", - "description": "Scan the database performance of the MySQL database with IP address 192.168.1.1, port 3306, username root, and password password", + "tool_id": "DuDlgP", + "description": "Use the mysql_analyzer tool to scan the MySQL database performance with host as 192.168.1.1 on port 3306" } ``` # Example 2 @@ -1242,16 +1242,16 @@ GEN_STEP: dict[LanguageType, str] = { - Result: `{"weather": "Sunny", "temperature": "25°C"}` # Tools - - mcp_tool_4 maps_geo_planner; Converts a detailed structured address into longitude and latitude coordinates. Supports parsing landmarks, scenic spots, and building names into longitude and latitude coordinates. - - mcp_tool_5 weather_query; Weather query, used to query weather information. - - mcp_tool_6 maps_direction_transit_integrated; Plans a commuting plan based on the user's starting and ending longitude and latitude coordinates, integrating various public transportation modes (train, bus, subway), and returns the commuting plan data. For cross-city scenarios, both the starting and ending cities must be provided. + - cSAads maps_geo_planner; Converts a detailed structured address into longitude and latitude coordinates. Supports parsing landmarks, scenic spots, and building names into longitude and latitude coordinates. + - sScseS weather_query; Weather query, used to query weather information. + - pcSEsx maps_direction_transit_integrated; Plans a commuting plan based on the user's starting and ending longitude and latitude coordinates, integrating various public transportation modes (train, bus, subway), and returns the commuting plan data. For cross-city scenarios, both the starting and ending cities must be provided. - Final Final; Final step. When this step is reached, plan execution is complete, and the resulting result is used as the final result. # Output ```json { - "tool_id": "mcp_tool_6", - "description": "Plan a comprehensive public transportation commute from Hangzhou to Beijing" + "tool_id": "pcSEsx", + "description": "Use the maps_direction_transit_integrated tool to plan a comprehensive public transportation commuting plan from Hangzhou to Beijing, based on historical context to obtain the latitude and longitude coordinates of Hangzhou and Beijing" } ``` # Now start generating steps: @@ -1418,7 +1418,7 @@ RISK_EVALUATE: dict[LanguageType, str] = { ```json { "risk": "medium", - "reason": "当前工具将连接到MySQL数据库并分析性能,可能会对数据库性能产生一定影响。请确保在非生产环境中执行此操作。" + "reason": "当前使用的工具名称是mysql_analyzer,针对host为192.0.0.1端口为3306的MySQL数据库进行性能分析,该操作可能会对数据库性能产生影响,建议仅在非生产环境下执行该操作。" } ``` # 工具 @@ -1467,7 +1467,7 @@ RISK_EVALUATE: dict[LanguageType, str] = { ```json { "risk": "medium", - "reason": "This tool will connect to a MySQL database and analyze performance, which may impact database performance. This operation should only be performed in a non-production environment." + "reason": "The current tool being used is mysql_analyzer, which analyzes the performance of the MySQL database at host 192.0.0.1 on port 3306. This operation may impact database performance, so it is recommended to perform it only in a non-production environment." } ``` # Tool -- Gitee