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
mcp.WithDescription("List Kubernetes resources in the current cluster by providing their apiVersion and kind and optionally the namespace"),
16
+
mcp.WithString("apiVersion",
17
+
mcp.Description("apiVersion of the resources (examples of valid apiVersion are: v1, apps/v1, networking.k8s.io/v1)"),
18
+
mcp.Required(),
19
+
),
20
+
mcp.WithString("kind",
21
+
mcp.Description("kind of the resources (examples of valid kind are: Pod, Service, Deployment, Ingress)"),
22
+
mcp.Required(),
23
+
),
24
+
mcp.WithString("namespace",
25
+
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"),
26
+
),
27
+
), resourcesList)
12
28
s.server.AddTool(mcp.NewTool(
13
29
"resources_create_or_update",
14
30
mcp.WithDescription("Create or update a Kubernetes resource in the current cluster by providing a YAML or JSON representation of the resource"),
@@ -19,6 +35,34 @@ func (s *Sever) initResources() {
iftoolResult.Content[0].(map[string]interface{})["text"].(string) !=`failed to list resources: no matches for kind "Custom" in version "custom.non.existent.example.com/v1"` {
0 commit comments