From 5a72eb7c64a7141eccbc9d0bfe01f9969e593e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E6=82=A6?= Date: Wed, 14 May 2025 16:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20WebSearch=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=BB=93=E6=9E=9C=EF=BC=8C=E5=8A=A0=E5=85=A5=E4=BB=8A?= =?UTF-8?q?=E5=A4=A9=E7=9A=84=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GLMSearch/Tool/Search.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GLMSearch/Tool/Search.cs b/GLMSearch/Tool/Search.cs index 7061b04..59fb255 100644 --- a/GLMSearch/Tool/Search.cs +++ b/GLMSearch/Tool/Search.cs @@ -8,9 +8,9 @@ namespace GLMSearch.Tools [McpServerToolType] public static class GLMWebSearch { - [McpServerTool(Name = "WebSearch"), Description("通过关键字进行Web搜索")] + [McpServerTool(Name = "WebSearch"), Description("通过关键字进行Web搜索。返回结果中包含当前的日期,如有必要,请注意甄别搜索结果的时效性。")] public static string WebSearch( - [Description("搜索关键字")] string keyword, + [Description("搜索关键字,注意要输入检索的关键字而不是问题本身,要解决一个问题可能需要多次搜索,直接搜索问题本身可能会限定搜索范围。")] string keyword, [Description("搜索引擎,请务必从[search_std,search_pro,search_pro_quark]中选择一个,默认是search_pro_quark,当返回失败或检索内容过少时可以尝试切换其他搜索引擎")] string search_engine = "search_pro_quark") { Console.WriteLine($"接收到搜索任务:{keyword}"); @@ -44,7 +44,8 @@ namespace GLMSearch.Tools new JProperty("content", result["content"]), new JProperty("title", result["title"]), new JProperty("media", result["media"]), - new JProperty("link", result["link"]) + new JProperty("link", result["link"]), + new JProperty("today", DateTime.Now.ToString("yyyy-MM-dd")) ); }).ToList();