You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/mcp/pods.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ func (s *Server) initPods() []server.ServerTool {
18
18
return []server.ServerTool{
19
19
{Tool: mcp.NewTool("pods_list",
20
20
mcp.WithDescription("List all the Kubernetes pods in the current cluster from all namespaces"),
21
-
mcp.WithString("labelSelector", mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]")),
21
+
mcp.WithString("labelSelector", mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$")),
22
22
// Tool annotations
23
23
mcp.WithTitleAnnotation("Pods: List"),
24
24
mcp.WithReadOnlyHintAnnotation(true),
@@ -28,7 +28,7 @@ func (s *Server) initPods() []server.ServerTool {
28
28
{Tool: mcp.NewTool("pods_list_in_namespace",
29
29
mcp.WithDescription("List all the Kubernetes pods in the specified namespace in the current cluster"),
30
30
mcp.WithString("namespace", mcp.Description("Namespace to list pods from"), mcp.Required()),
31
-
mcp.WithString("labelSelector", mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]")),
31
+
mcp.WithString("labelSelector", mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$")),
32
32
// Tool annotations
33
33
mcp.WithTitleAnnotation("Pods: List in Namespace"),
34
34
mcp.WithReadOnlyHintAnnotation(true),
@@ -61,7 +61,7 @@ func (s *Server) initPods() []server.ServerTool {
61
61
mcp.WithBoolean("all_namespaces", mcp.Description("If true, list the resource consumption for all Pods in all namespaces. If false, list the resource consumption for Pods in the provided namespace or the current namespace"), mcp.DefaultBool(true)),
62
62
mcp.WithString("namespace", mcp.Description("Namespace to get the Pods resource consumption from (Optional, current namespace if not provided and all_namespaces is false)")),
63
63
mcp.WithString("name", mcp.Description("Name of the Pod to get the resource consumption from (Optional, all Pods in the namespace if not provided)")),
64
-
mcp.WithString("label_selector", mcp.Description("Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)"), mcp.Pattern("([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]")),
64
+
mcp.WithString("label_selector", mcp.Description("Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)"), mcp.Pattern("^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$")),
Copy file name to clipboardExpand all lines: pkg/mcp/resources.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ func (s *Server) initResources() []server.ServerTool {
34
34
mcp.WithString("namespace",
35
35
mcp.Description("Optional Namespace to retrieve the namespaced resources from (ignored in case of cluster scoped resources). If not provided, will list resources from all namespaces")),
36
36
mcp.WithString("labelSelector",
37
-
mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]")),
37
+
mcp.Description("Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label"), mcp.Pattern("^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$")),
0 commit comments