Skip to content

Commit db3f51d

Browse files
authored
fix(toolsets): remove "redundant" annotations that have defaults (#441)
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 <marc@marcnuri.com>
1 parent a301b0f commit db3f51d

14 files changed

+1
-134
lines changed

pkg/mcp/testdata/toolsets-config-tools.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"title": "Configuration: View",
55
"readOnlyHint": true,
66
"destructiveHint": false,
7-
"idempotentHint": false,
87
"openWorldHint": true
98
},
109
"description": "Get the current Kubernetes configuration content as a kubeconfig YAML",

pkg/mcp/testdata/toolsets-core-tools.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"title": "Events: List",
55
"readOnlyHint": true,
66
"destructiveHint": false,
7-
"idempotentHint": false,
87
"openWorldHint": true
98
},
109
"description": "List all the Kubernetes events in the current cluster from all namespaces",
@@ -24,7 +23,6 @@
2423
"title": "Namespaces: List",
2524
"readOnlyHint": true,
2625
"destructiveHint": false,
27-
"idempotentHint": false,
2826
"openWorldHint": true
2927
},
3028
"description": "List all the Kubernetes namespaces in the current cluster",
@@ -38,7 +36,6 @@
3836
"title": "Node: Log",
3937
"readOnlyHint": true,
4038
"destructiveHint": false,
41-
"idempotentHint": false,
4239
"openWorldHint": true
4340
},
4441
"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 @@
7269
"title": "Node: Stats Summary",
7370
"readOnlyHint": true,
7471
"destructiveHint": false,
75-
"idempotentHint": false,
7672
"openWorldHint": true
7773
},
7874
"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 @@
118114
{
119115
"annotations": {
120116
"title": "Pods: Delete",
121-
"readOnlyHint": false,
122117
"destructiveHint": true,
123118
"idempotentHint": true,
124119
"openWorldHint": true
@@ -145,9 +140,7 @@
145140
{
146141
"annotations": {
147142
"title": "Pods: Exec",
148-
"readOnlyHint": false,
149143
"destructiveHint": true,
150-
"idempotentHint": false,
151144
"openWorldHint": true
152145
},
153146
"description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command",
@@ -186,7 +179,6 @@
186179
"title": "Pods: Get",
187180
"readOnlyHint": true,
188181
"destructiveHint": false,
189-
"idempotentHint": false,
190182
"openWorldHint": true
191183
},
192184
"description": "Get a Kubernetes Pod in the current or provided namespace with the provided name",
@@ -213,7 +205,6 @@
213205
"title": "Pods: List",
214206
"readOnlyHint": true,
215207
"destructiveHint": false,
216-
"idempotentHint": false,
217208
"openWorldHint": true
218209
},
219210
"description": "List all the Kubernetes pods in the current cluster from all namespaces",
@@ -234,7 +225,6 @@
234225
"title": "Pods: List in Namespace",
235226
"readOnlyHint": true,
236227
"destructiveHint": false,
237-
"idempotentHint": false,
238228
"openWorldHint": true
239229
},
240230
"description": "List all the Kubernetes pods in the specified namespace in the current cluster",
@@ -262,7 +252,6 @@
262252
"title": "Pods: Log",
263253
"readOnlyHint": true,
264254
"destructiveHint": false,
265-
"idempotentHint": false,
266255
"openWorldHint": true
267256
},
268257
"description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name",
@@ -301,9 +290,7 @@
301290
{
302291
"annotations": {
303292
"title": "Pods: Run",
304-
"readOnlyHint": false,
305293
"destructiveHint": false,
306-
"idempotentHint": false,
307294
"openWorldHint": true
308295
},
309296
"description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name",
@@ -370,7 +357,6 @@
370357
{
371358
"annotations": {
372359
"title": "Resources: Create or Update",
373-
"readOnlyHint": false,
374360
"destructiveHint": true,
375361
"idempotentHint": true,
376362
"openWorldHint": true
@@ -393,7 +379,6 @@
393379
{
394380
"annotations": {
395381
"title": "Resources: Delete",
396-
"readOnlyHint": false,
397382
"destructiveHint": true,
398383
"idempotentHint": true,
399384
"openWorldHint": true
@@ -432,7 +417,6 @@
432417
"title": "Resources: Get",
433418
"readOnlyHint": true,
434419
"destructiveHint": false,
435-
"idempotentHint": false,
436420
"openWorldHint": true
437421
},
438422
"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 @@
469453
"title": "Resources: List",
470454
"readOnlyHint": true,
471455
"destructiveHint": false,
472-
"idempotentHint": false,
473456
"openWorldHint": true
474457
},
475458
"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)",

pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"title": "Configuration: View",
1919
"readOnlyHint": true,
2020
"destructiveHint": false,
21-
"idempotentHint": false,
2221
"openWorldHint": true
2322
},
2423
"description": "Get the current Kubernetes configuration content as a kubeconfig YAML",
@@ -38,7 +37,6 @@
3837
"title": "Events: List",
3938
"readOnlyHint": true,
4039
"destructiveHint": false,
41-
"idempotentHint": false,
4240
"openWorldHint": true
4341
},
4442
"description": "List all the Kubernetes events in the current cluster from all namespaces",
@@ -64,9 +62,7 @@
6462
{
6563
"annotations": {
6664
"title": "Helm: Install",
67-
"readOnlyHint": false,
6865
"destructiveHint": false,
69-
"idempotentHint": false,
7066
"openWorldHint": true
7167
},
7268
"description": "Install a Helm chart in the current or provided namespace",
@@ -109,7 +105,6 @@
109105
"title": "Helm: List",
110106
"readOnlyHint": true,
111107
"destructiveHint": false,
112-
"idempotentHint": false,
113108
"openWorldHint": true
114109
},
115110
"description": "List all the Helm releases in the current or provided namespace (or in all namespaces if specified)",
@@ -139,7 +134,6 @@
139134
{
140135
"annotations": {
141136
"title": "Helm: Uninstall",
142-
"readOnlyHint": false,
143137
"destructiveHint": true,
144138
"idempotentHint": true,
145139
"openWorldHint": true
@@ -176,7 +170,6 @@
176170
"title": "Namespaces: List",
177171
"readOnlyHint": true,
178172
"destructiveHint": false,
179-
"idempotentHint": false,
180173
"openWorldHint": true
181174
},
182175
"description": "List all the Kubernetes namespaces in the current cluster",
@@ -200,7 +193,6 @@
200193
"title": "Node: Log",
201194
"readOnlyHint": true,
202195
"destructiveHint": false,
203-
"idempotentHint": false,
204196
"openWorldHint": true
205197
},
206198
"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 @@
242234
"title": "Node: Stats Summary",
243235
"readOnlyHint": true,
244236
"destructiveHint": false,
245-
"idempotentHint": false,
246237
"openWorldHint": true
247238
},
248239
"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 @@
304295
{
305296
"annotations": {
306297
"title": "Pods: Delete",
307-
"readOnlyHint": false,
308298
"destructiveHint": true,
309299
"idempotentHint": true,
310300
"openWorldHint": true
@@ -339,9 +329,7 @@
339329
{
340330
"annotations": {
341331
"title": "Pods: Exec",
342-
"readOnlyHint": false,
343332
"destructiveHint": true,
344-
"idempotentHint": false,
345333
"openWorldHint": true
346334
},
347335
"description": "Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command",
@@ -388,7 +376,6 @@
388376
"title": "Pods: Get",
389377
"readOnlyHint": true,
390378
"destructiveHint": false,
391-
"idempotentHint": false,
392379
"openWorldHint": true
393380
},
394381
"description": "Get a Kubernetes Pod in the current or provided namespace with the provided name",
@@ -423,7 +410,6 @@
423410
"title": "Pods: List",
424411
"readOnlyHint": true,
425412
"destructiveHint": false,
426-
"idempotentHint": false,
427413
"openWorldHint": true
428414
},
429415
"description": "List all the Kubernetes pods in the current cluster from all namespaces",
@@ -452,7 +438,6 @@
452438
"title": "Pods: List in Namespace",
453439
"readOnlyHint": true,
454440
"destructiveHint": false,
455-
"idempotentHint": false,
456441
"openWorldHint": true
457442
},
458443
"description": "List all the Kubernetes pods in the specified namespace in the current cluster",
@@ -488,7 +473,6 @@
488473
"title": "Pods: Log",
489474
"readOnlyHint": true,
490475
"destructiveHint": false,
491-
"idempotentHint": false,
492476
"openWorldHint": true
493477
},
494478
"description": "Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name",
@@ -535,9 +519,7 @@
535519
{
536520
"annotations": {
537521
"title": "Pods: Run",
538-
"readOnlyHint": false,
539522
"destructiveHint": false,
540-
"idempotentHint": false,
541523
"openWorldHint": true
542524
},
543525
"description": "Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name",
@@ -620,7 +602,6 @@
620602
{
621603
"annotations": {
622604
"title": "Resources: Create or Update",
623-
"readOnlyHint": false,
624605
"destructiveHint": true,
625606
"idempotentHint": true,
626607
"openWorldHint": true
@@ -651,7 +632,6 @@
651632
{
652633
"annotations": {
653634
"title": "Resources: Delete",
654-
"readOnlyHint": false,
655635
"destructiveHint": true,
656636
"idempotentHint": true,
657637
"openWorldHint": true
@@ -698,7 +678,6 @@
698678
"title": "Resources: Get",
699679
"readOnlyHint": true,
700680
"destructiveHint": false,
701-
"idempotentHint": false,
702681
"openWorldHint": true
703682
},
704683
"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 @@
743722
"title": "Resources: List",
744723
"readOnlyHint": true,
745724
"destructiveHint": false,
746-
"idempotentHint": false,
747725
"openWorldHint": true
748726
},
749727
"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)",

0 commit comments

Comments
 (0)