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/resources.go
+43Lines changed: 43 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,25 @@ func (s *Sever) initResources() {
52
52
mcp.Required(),
53
53
),
54
54
), resourcesCreateOrUpdate)
55
+
s.server.AddTool(mcp.NewTool(
56
+
"resources_delete",
57
+
mcp.WithDescription("Delete a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name"),
58
+
mcp.WithString("apiVersion",
59
+
mcp.Description("apiVersion of the resource (examples of valid apiVersion are: v1, apps/v1, networking.k8s.io/v1)"),
60
+
mcp.Required(),
61
+
),
62
+
mcp.WithString("kind",
63
+
mcp.Description("kind of the resource (examples of valid kind are: Pod, Service, Deployment, Ingress)"),
64
+
mcp.Required(),
65
+
),
66
+
mcp.WithString("namespace",
67
+
mcp.Description("Optional Namespace to delete the namespaced resource from (ignored in case of cluster scoped resources). If not provided, will delete resource from configured namespace"),
iftoolResult.Content[0].(map[string]interface{})["text"].(string) !=`failed to delete resource: no matches for kind "Custom" in version "custom.non.existent.example.com/v1"` {
0 commit comments