From 19f649758f4a17f5cf16387c52582c30a9a93605 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 5 Nov 2025 11:59:57 +0100 Subject: [PATCH] fix(toolsets): remove "redundant" annotations that have defaults The removed annotations have default values and are not needed. I personally prefer to keep them because it makes it easier for reviewers to understand the tool behaviors. However, this is problematic with go-sdk since these values aren't marshalled/serialized (omitempty). Signed-off-by: Marc Nuri --- pkg/mcp/testdata/toolsets-config-tools.json | 1 - pkg/mcp/testdata/toolsets-core-tools.json | 17 -------------- ...toolsets-full-tools-multicluster-enum.json | 22 ------------------ .../toolsets-full-tools-multicluster.json | 22 ------------------ .../toolsets-full-tools-openshift.json | 23 ------------------- pkg/mcp/testdata/toolsets-full-tools.json | 22 ------------------ pkg/mcp/testdata/toolsets-helm-tools.json | 4 ---- pkg/toolsets/config/configuration.go | 1 - pkg/toolsets/core/events.go | 1 - pkg/toolsets/core/namespaces.go | 2 -- pkg/toolsets/core/nodes.go | 2 -- pkg/toolsets/core/pods.go | 9 -------- pkg/toolsets/core/resources.go | 4 ---- pkg/toolsets/helm/helm.go | 5 +--- 14 files changed, 1 insertion(+), 134 deletions(-) diff --git a/pkg/mcp/testdata/toolsets-config-tools.json b/pkg/mcp/testdata/toolsets-config-tools.json index c17674914..2c5b7ae8a 100644 --- a/pkg/mcp/testdata/toolsets-config-tools.json +++ b/pkg/mcp/testdata/toolsets-config-tools.json @@ -4,7 +4,6 @@ "title": "Configuration: View", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the current Kubernetes configuration content as a kubeconfig YAML", diff --git a/pkg/mcp/testdata/toolsets-core-tools.json b/pkg/mcp/testdata/toolsets-core-tools.json index e87537581..b4c5667f9 100644 --- a/pkg/mcp/testdata/toolsets-core-tools.json +++ b/pkg/mcp/testdata/toolsets-core-tools.json @@ -4,7 +4,6 @@ "title": "Events: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes events in the current cluster from all namespaces", @@ -24,7 +23,6 @@ "title": "Namespaces: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes namespaces in the current cluster", @@ -38,7 +36,6 @@ "title": "Node: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs). This accesses node logs through the Kubernetes API proxy to the kubelet", @@ -72,7 +69,6 @@ "title": "Node: Stats Summary", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics", @@ -118,7 +114,6 @@ { "annotations": { "title": "Pods: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -145,9 +140,7 @@ { "annotations": { "title": "Pods: Exec", - "readOnlyHint": false, "destructiveHint": true, - "idempotentHint": false, "openWorldHint": true }, "description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command", @@ -186,7 +179,6 @@ "title": "Pods: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes Pod in the current or provided namespace with the provided name", @@ -213,7 +205,6 @@ "title": "Pods: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the current cluster from all namespaces", @@ -234,7 +225,6 @@ "title": "Pods: List in Namespace", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the specified namespace in the current cluster", @@ -262,7 +252,6 @@ "title": "Pods: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name", @@ -301,9 +290,7 @@ { "annotations": { "title": "Pods: Run", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name", @@ -370,7 +357,6 @@ { "annotations": { "title": "Resources: Create or Update", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -393,7 +379,6 @@ { "annotations": { "title": "Resources: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -432,7 +417,6 @@ "title": "Resources: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", @@ -469,7 +453,6 @@ "title": "Resources: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List Kubernetes resources and objects in the current cluster by providing their apiVersion and kind and optionally the namespace and label selector\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", diff --git a/pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json b/pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json index 08181078b..7831c0543 100644 --- a/pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json +++ b/pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json @@ -18,7 +18,6 @@ "title": "Configuration: View", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the current Kubernetes configuration content as a kubeconfig YAML", @@ -38,7 +37,6 @@ "title": "Events: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes events in the current cluster from all namespaces", @@ -64,9 +62,7 @@ { "annotations": { "title": "Helm: Install", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Install a Helm chart in the current or provided namespace", @@ -109,7 +105,6 @@ "title": "Helm: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)", @@ -139,7 +134,6 @@ { "annotations": { "title": "Helm: Uninstall", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -176,7 +170,6 @@ "title": "Namespaces: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes namespaces in the current cluster", @@ -200,7 +193,6 @@ "title": "Node: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs). This accesses node logs through the Kubernetes API proxy to the kubelet", @@ -242,7 +234,6 @@ "title": "Node: Stats Summary", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics", @@ -304,7 +295,6 @@ { "annotations": { "title": "Pods: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -339,9 +329,7 @@ { "annotations": { "title": "Pods: Exec", - "readOnlyHint": false, "destructiveHint": true, - "idempotentHint": false, "openWorldHint": true }, "description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command", @@ -388,7 +376,6 @@ "title": "Pods: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes Pod in the current or provided namespace with the provided name", @@ -423,7 +410,6 @@ "title": "Pods: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the current cluster from all namespaces", @@ -452,7 +438,6 @@ "title": "Pods: List in Namespace", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the specified namespace in the current cluster", @@ -488,7 +473,6 @@ "title": "Pods: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name", @@ -535,9 +519,7 @@ { "annotations": { "title": "Pods: Run", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name", @@ -620,7 +602,6 @@ { "annotations": { "title": "Resources: Create or Update", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -651,7 +632,6 @@ { "annotations": { "title": "Resources: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -698,7 +678,6 @@ "title": "Resources: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", @@ -743,7 +722,6 @@ "title": "Resources: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List Kubernetes resources and objects in the current cluster by providing their apiVersion and kind and optionally the namespace and label selector\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", diff --git a/pkg/mcp/testdata/toolsets-full-tools-multicluster.json b/pkg/mcp/testdata/toolsets-full-tools-multicluster.json index 74a48d56f..b95f179c8 100644 --- a/pkg/mcp/testdata/toolsets-full-tools-multicluster.json +++ b/pkg/mcp/testdata/toolsets-full-tools-multicluster.json @@ -18,7 +18,6 @@ "title": "Configuration: View", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the current Kubernetes configuration content as a kubeconfig YAML", @@ -38,7 +37,6 @@ "title": "Events: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes events in the current cluster from all namespaces", @@ -60,9 +58,7 @@ { "annotations": { "title": "Helm: Install", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Install a Helm chart in the current or provided namespace", @@ -101,7 +97,6 @@ "title": "Helm: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)", @@ -127,7 +122,6 @@ { "annotations": { "title": "Helm: Uninstall", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -160,7 +154,6 @@ "title": "Namespaces: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes namespaces in the current cluster", @@ -180,7 +173,6 @@ "title": "Node: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs). This accesses node logs through the Kubernetes API proxy to the kubelet", @@ -218,7 +210,6 @@ "title": "Node: Stats Summary", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics", @@ -272,7 +263,6 @@ { "annotations": { "title": "Pods: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -303,9 +293,7 @@ { "annotations": { "title": "Pods: Exec", - "readOnlyHint": false, "destructiveHint": true, - "idempotentHint": false, "openWorldHint": true }, "description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command", @@ -348,7 +336,6 @@ "title": "Pods: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes Pod in the current or provided namespace with the provided name", @@ -379,7 +366,6 @@ "title": "Pods: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the current cluster from all namespaces", @@ -404,7 +390,6 @@ "title": "Pods: List in Namespace", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the specified namespace in the current cluster", @@ -436,7 +421,6 @@ "title": "Pods: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name", @@ -479,9 +463,7 @@ { "annotations": { "title": "Pods: Run", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name", @@ -556,7 +538,6 @@ { "annotations": { "title": "Resources: Create or Update", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -583,7 +564,6 @@ { "annotations": { "title": "Resources: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -626,7 +606,6 @@ "title": "Resources: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", @@ -667,7 +646,6 @@ "title": "Resources: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List Kubernetes resources and objects in the current cluster by providing their apiVersion and kind and optionally the namespace and label selector\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", diff --git a/pkg/mcp/testdata/toolsets-full-tools-openshift.json b/pkg/mcp/testdata/toolsets-full-tools-openshift.json index 041c86715..e4488b0aa 100644 --- a/pkg/mcp/testdata/toolsets-full-tools-openshift.json +++ b/pkg/mcp/testdata/toolsets-full-tools-openshift.json @@ -4,7 +4,6 @@ "title": "Configuration: View", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the current Kubernetes configuration content as a kubeconfig YAML", @@ -24,7 +23,6 @@ "title": "Events: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes events in the current cluster from all namespaces", @@ -42,9 +40,7 @@ { "annotations": { "title": "Helm: Install", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Install a Helm chart in the current or provided namespace", @@ -79,7 +75,6 @@ "title": "Helm: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)", @@ -101,7 +96,6 @@ { "annotations": { "title": "Helm: Uninstall", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -130,7 +124,6 @@ "title": "Namespaces: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes namespaces in the current cluster", @@ -144,7 +137,6 @@ "title": "Node: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs). This accesses node logs through the Kubernetes API proxy to the kubelet", @@ -178,7 +170,6 @@ "title": "Node: Stats Summary", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics", @@ -224,7 +215,6 @@ { "annotations": { "title": "Pods: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -251,9 +241,7 @@ { "annotations": { "title": "Pods: Exec", - "readOnlyHint": false, "destructiveHint": true, - "idempotentHint": false, "openWorldHint": true }, "description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command", @@ -292,7 +280,6 @@ "title": "Pods: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes Pod in the current or provided namespace with the provided name", @@ -319,7 +306,6 @@ "title": "Pods: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the current cluster from all namespaces", @@ -340,7 +326,6 @@ "title": "Pods: List in Namespace", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the specified namespace in the current cluster", @@ -368,7 +353,6 @@ "title": "Pods: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name", @@ -407,9 +391,7 @@ { "annotations": { "title": "Pods: Run", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name", @@ -478,7 +460,6 @@ "title": "Projects: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the OpenShift projects in the current cluster", @@ -490,7 +471,6 @@ { "annotations": { "title": "Resources: Create or Update", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -513,7 +493,6 @@ { "annotations": { "title": "Resources: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -552,7 +531,6 @@ "title": "Resources: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress, route.openshift.io/v1 Route)", @@ -589,7 +567,6 @@ "title": "Resources: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List Kubernetes resources and objects in the current cluster by providing their apiVersion and kind and optionally the namespace and label selector\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress, route.openshift.io/v1 Route)", diff --git a/pkg/mcp/testdata/toolsets-full-tools.json b/pkg/mcp/testdata/toolsets-full-tools.json index 2f314aec5..ca2700279 100644 --- a/pkg/mcp/testdata/toolsets-full-tools.json +++ b/pkg/mcp/testdata/toolsets-full-tools.json @@ -4,7 +4,6 @@ "title": "Configuration: View", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the current Kubernetes configuration content as a kubeconfig YAML", @@ -24,7 +23,6 @@ "title": "Events: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes events in the current cluster from all namespaces", @@ -42,9 +40,7 @@ { "annotations": { "title": "Helm: Install", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Install a Helm chart in the current or provided namespace", @@ -79,7 +75,6 @@ "title": "Helm: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)", @@ -101,7 +96,6 @@ { "annotations": { "title": "Helm: Uninstall", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -130,7 +124,6 @@ "title": "Namespaces: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes namespaces in the current cluster", @@ -144,7 +137,6 @@ "title": "Node: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs). This accesses node logs through the Kubernetes API proxy to the kubelet", @@ -178,7 +170,6 @@ "title": "Node: Stats Summary", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics", @@ -224,7 +215,6 @@ { "annotations": { "title": "Pods: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -251,9 +241,7 @@ { "annotations": { "title": "Pods: Exec", - "readOnlyHint": false, "destructiveHint": true, - "idempotentHint": false, "openWorldHint": true }, "description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command", @@ -292,7 +280,6 @@ "title": "Pods: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes Pod in the current or provided namespace with the provided name", @@ -319,7 +306,6 @@ "title": "Pods: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the current cluster from all namespaces", @@ -340,7 +326,6 @@ "title": "Pods: List in Namespace", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Kubernetes pods in the specified namespace in the current cluster", @@ -368,7 +353,6 @@ "title": "Pods: Log", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name", @@ -407,9 +391,7 @@ { "annotations": { "title": "Pods: Run", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name", @@ -476,7 +458,6 @@ { "annotations": { "title": "Resources: Create or Update", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -499,7 +480,6 @@ { "annotations": { "title": "Resources: Delete", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true @@ -538,7 +518,6 @@ "title": "Resources: Get", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Get a Kubernetes resource in the current cluster by providing its apiVersion, kind, optionally the namespace, and its name\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", @@ -575,7 +554,6 @@ "title": "Resources: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List Kubernetes resources and objects in the current cluster by providing their apiVersion and kind and optionally the namespace and label selector\n(common apiVersion and kind include: v1 Pod, v1 Service, v1 Node, apps/v1 Deployment, networking.k8s.io/v1 Ingress)", diff --git a/pkg/mcp/testdata/toolsets-helm-tools.json b/pkg/mcp/testdata/toolsets-helm-tools.json index c57dfc27d..6afd3f33d 100644 --- a/pkg/mcp/testdata/toolsets-helm-tools.json +++ b/pkg/mcp/testdata/toolsets-helm-tools.json @@ -2,9 +2,7 @@ { "annotations": { "title": "Helm: Install", - "readOnlyHint": false, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "Install a Helm chart in the current or provided namespace", @@ -39,7 +37,6 @@ "title": "Helm: List", "readOnlyHint": true, "destructiveHint": false, - "idempotentHint": false, "openWorldHint": true }, "description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)", @@ -61,7 +58,6 @@ { "annotations": { "title": "Helm: Uninstall", - "readOnlyHint": false, "destructiveHint": true, "idempotentHint": true, "openWorldHint": true diff --git a/pkg/toolsets/config/configuration.go b/pkg/toolsets/config/configuration.go index 6b6b45d30..ab973da16 100644 --- a/pkg/toolsets/config/configuration.go +++ b/pkg/toolsets/config/configuration.go @@ -51,7 +51,6 @@ func initConfiguration() []api.ServerTool { Title: "Configuration: View", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, diff --git a/pkg/toolsets/core/events.go b/pkg/toolsets/core/events.go index f10ff5762..43ae1cc17 100644 --- a/pkg/toolsets/core/events.go +++ b/pkg/toolsets/core/events.go @@ -28,7 +28,6 @@ func initEvents() []api.ServerTool { Title: "Events: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: eventsList}, diff --git a/pkg/toolsets/core/namespaces.go b/pkg/toolsets/core/namespaces.go index 71995d8c2..2f2ee8fca 100644 --- a/pkg/toolsets/core/namespaces.go +++ b/pkg/toolsets/core/namespaces.go @@ -24,7 +24,6 @@ func initNamespaces(o internalk8s.Openshift) []api.ServerTool { Title: "Namespaces: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: namespacesList, @@ -41,7 +40,6 @@ func initNamespaces(o internalk8s.Openshift) []api.ServerTool { Title: "Projects: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: projectsList, diff --git a/pkg/toolsets/core/nodes.go b/pkg/toolsets/core/nodes.go index 04798d0dd..e42a8a988 100644 --- a/pkg/toolsets/core/nodes.go +++ b/pkg/toolsets/core/nodes.go @@ -45,7 +45,6 @@ func initNodes() []api.ServerTool { Title: "Node: Log", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: nodesLog}, @@ -66,7 +65,6 @@ func initNodes() []api.ServerTool { Title: "Node: Stats Summary", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: nodesStatsSummary}, diff --git a/pkg/toolsets/core/pods.go b/pkg/toolsets/core/pods.go index 8744a9741..787813324 100644 --- a/pkg/toolsets/core/pods.go +++ b/pkg/toolsets/core/pods.go @@ -33,7 +33,6 @@ func initPods() []api.ServerTool { Title: "Pods: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsListInAllNamespaces}, @@ -59,7 +58,6 @@ func initPods() []api.ServerTool { Title: "Pods: List in Namespace", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsListInNamespace}, @@ -84,7 +82,6 @@ func initPods() []api.ServerTool { Title: "Pods: Get", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsGet}, @@ -107,7 +104,6 @@ func initPods() []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Pods: Delete", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(true), IdempotentHint: ptr.To(true), OpenWorldHint: ptr.To(true), @@ -177,9 +173,7 @@ func initPods() []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Pods: Exec", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(true), // Depending on the Pod's entrypoint, executing certain commands may kill the Pod - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsExec}, @@ -218,7 +212,6 @@ func initPods() []api.ServerTool { Title: "Pods: Log", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsLog}, @@ -249,9 +242,7 @@ func initPods() []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Pods: Run", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: podsRun}, diff --git a/pkg/toolsets/core/resources.go b/pkg/toolsets/core/resources.go index a3536f562..52a613b30 100644 --- a/pkg/toolsets/core/resources.go +++ b/pkg/toolsets/core/resources.go @@ -51,7 +51,6 @@ func initResources(o internalk8s.Openshift) []api.ServerTool { Title: "Resources: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: resourcesList}, @@ -84,7 +83,6 @@ func initResources(o internalk8s.Openshift) []api.ServerTool { Title: "Resources: Get", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: resourcesGet}, @@ -103,7 +101,6 @@ func initResources(o internalk8s.Openshift) []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Resources: Create or Update", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(true), IdempotentHint: ptr.To(true), OpenWorldHint: ptr.To(true), @@ -136,7 +133,6 @@ func initResources(o internalk8s.Openshift) []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Resources: Delete", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(true), IdempotentHint: ptr.To(true), OpenWorldHint: ptr.To(true), diff --git a/pkg/toolsets/helm/helm.go b/pkg/toolsets/helm/helm.go index 0352cf608..646941f19 100644 --- a/pkg/toolsets/helm/helm.go +++ b/pkg/toolsets/helm/helm.go @@ -39,9 +39,8 @@ func initHelm() []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Helm: Install", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), // TODO: consider replacing implementation with equivalent to: helm upgrade --install + IdempotentHint: nil, // TODO: consider replacing implementation with equivalent to: helm upgrade --install OpenWorldHint: ptr.To(true), }, }, Handler: helmInstall}, @@ -65,7 +64,6 @@ func initHelm() []api.ServerTool { Title: "Helm: List", ReadOnlyHint: ptr.To(true), DestructiveHint: ptr.To(false), - IdempotentHint: ptr.To(false), OpenWorldHint: ptr.To(true), }, }, Handler: helmList}, @@ -88,7 +86,6 @@ func initHelm() []api.ServerTool { }, Annotations: api.ToolAnnotations{ Title: "Helm: Uninstall", - ReadOnlyHint: ptr.To(false), DestructiveHint: ptr.To(true), IdempotentHint: ptr.To(true), OpenWorldHint: ptr.To(true),