feature/loki-log-queries #7
@@ -589,9 +589,15 @@ func makeQueryLogsHandler(loki *LokiClient) mcp.ToolHandler {
|
|||||||
if l, ok := args["limit"].(float64); ok && l > 0 {
|
if l, ok := args["limit"].(float64); ok && l > 0 {
|
||||||
limit = int(l)
|
limit = int(l)
|
||||||
}
|
}
|
||||||
|
if limit > 5000 {
|
||||||
|
limit = 5000
|
||||||
|
}
|
||||||
|
|
||||||
direction := "backward"
|
direction := "backward"
|
||||||
if d, ok := args["direction"].(string); ok && d != "" {
|
if d, ok := args["direction"].(string); ok && d != "" {
|
||||||
|
if d != "backward" && d != "forward" {
|
||||||
|
return mcp.ErrorContent(fmt.Errorf("direction must be 'backward' or 'forward'")), nil
|
||||||
|
}
|
||||||
direction = d
|
direction = d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user