Oxidaner commented on code in PR #1483:
URL: https://github.com/apache/dubbo-admin/pull/1483#discussion_r3407944375


##########
pkg/mcp/register.go:
##########
@@ -310,4 +311,35 @@ func RegisterTools(server *Server) {
                },
                Handler: tools.GetApplicationServices,
        })
+
+       logSearchProperties := logtools.LogSearchProperties()
+       server.RegisterTool(&common.ToolDef{
+               Name:        "search_logs",
+               Description: "查询 Dubbo 服务日志,支持按应用、服务、实例、TraceID 和关键字过滤",
+               InputSchema: common.InputSchema{
+                       Type:       "object",
+                       Properties: logSearchProperties,
+               },
+               Handler: logtools.SearchLogs,
+       })
+
+       server.RegisterTool(&common.ToolDef{
+               Name:        "analyze_error_logs",
+               Description: "分析错误日志并按错误模式聚合",
+               InputSchema: common.InputSchema{
+                       Type:       "object",
+                       Properties: logSearchProperties,
+               },
+               Handler: logtools.AnalyzeErrorLogs,
+       })
+
+       server.RegisterTool(&common.ToolDef{
+               Name:        "get_log_capabilities",
+               Description: "获取日志查询能力,返回 Loki 当前可用 labels 以及查询参数到 labels 的映射",

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to