From aed16c8c6b0bd4da75337a760b1399e2d2255fce Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Wed, 17 Dec 2025 13:27:35 +0800 Subject: [PATCH] update pay ui --- mcp_server.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/mcp_server.py b/mcp_server.py index e21d4ba9..15d5d219 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -1930,7 +1930,19 @@ class MCPAgentIntegrated: ## 示例 -**示例 1: 简单查询(2 步)** +**示例 1: 概念板块查询(1-2 步)** +用户:"商业航天有哪些股票" +```json +{{ + "goal": "查询商业航天概念板块的相关股票", + "reasoning": "使用 search_concepts 搜索概念板块,会返回概念详情和相关股票列表", + "steps": [ + {{"tool": "search_concepts", "arguments": {{"query": "商业航天", "size": 10}}, "reason": "搜索商业航天概念,获取相关股票"}} + ] +}} +``` + +**示例 2: 新闻查询(2 步)** 用户:"贵州茅台最近有什么新闻" ```json {{ @@ -1943,33 +1955,31 @@ class MCPAgentIntegrated: }} ``` -**示例 2: 中等复杂度(4 步)** +**示例 3: 股票对比分析(4 步)** 用户:"对比分析贵州茅台和五粮液的投资价值" ```json {{ "goal": "对比分析两只股票的投资价值", "reasoning": "需要分别获取两只股票的数据,然后对比分析", "steps": [ - {{"tool": "get_stock_info", "arguments": {{"stock_code": "600519"}}, "reason": "获取茅台数据"}}, - {{"tool": "get_stock_info", "arguments": {{"stock_code": "000858"}}, "reason": "获取五粮液数据"}}, + {{"tool": "get_stock_basic_info", "arguments": {{"stock_code": "600519"}}, "reason": "获取茅台基本信息"}}, + {{"tool": "get_stock_basic_info", "arguments": {{"stock_code": "000858"}}, "reason": "获取五粮液基本信息"}}, {{"tool": "search_china_news", "arguments": {{"query": "茅台 五粮液 对比", "top_k": 5}}, "reason": "搜索对比分析文章"}}, {{"tool": "summarize_news", "arguments": {{"data": "新闻", "focus": "投资价值对比"}}, "reason": "总结对比结论"}} ] }} ``` -**示例 3: 复杂分析(6 步)** -用户:"全面分析人工智能概念板块的投资机会" +**示例 4: 概念板块深度分析(4-5 步)** +用户:"分析人工智能概念板块的投资机会" ```json {{ "goal": "深度分析人工智能板块的投资机会", - "reasoning": "需要获取板块数据、龙头股、资金流向、新闻动态等多维度信息", + "reasoning": "先搜索概念获取成分股,再搜索涨停数据和新闻,最后总结", "steps": [ - {{"tool": "get_concept_stocks", "arguments": {{"concept": "人工智能"}}, "reason": "获取概念成分股"}}, - {{"tool": "get_concept_money_flow", "arguments": {{"concept": "人工智能"}}, "reason": "获取资金流向"}}, - {{"tool": "get_limit_up_stocks", "arguments": {{"concept": "人工智能"}}, "reason": "查看涨停股情况"}}, - {{"tool": "search_china_news", "arguments": {{"query": "人工智能概念股", "top_k": 15}}, "reason": "搜索最新新闻"}}, - {{"tool": "get_stock_info", "arguments": {{"stock_code": "300496"}}, "reason": "分析龙头股中科创达"}}, + {{"tool": "search_concepts", "arguments": {{"query": "人工智能", "size": 10, "sort_by": "change_pct"}}, "reason": "搜索人工智能概念,获取成分股和涨跌情况"}}, + {{"tool": "search_limit_up_stocks", "arguments": {{"query": "人工智能"}}, "reason": "查看AI相关涨停股"}}, + {{"tool": "search_china_news", "arguments": {{"query": "人工智能概念股", "top_k": 10}}, "reason": "搜索最新新闻动态"}}, {{"tool": "summarize_news", "arguments": {{"data": "所有数据", "focus": "投资机会和风险"}}, "reason": "综合分析总结"}} ] }}