@gcnv/gcnv-mcp-server 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/GEMINI.md +200 -0
  2. package/LICENSE +201 -0
  3. package/README.md +374 -0
  4. package/build/index.js +185 -0
  5. package/build/logger.js +19 -0
  6. package/build/registry/register-tools.js +101 -0
  7. package/build/registry/tool-registry.js +27 -0
  8. package/build/tools/active-directory-tools.js +124 -0
  9. package/build/tools/backup-policy-tools.js +140 -0
  10. package/build/tools/backup-tools.js +178 -0
  11. package/build/tools/backup-vault-tools.js +147 -0
  12. package/build/tools/handlers/active-directory-handler.js +321 -0
  13. package/build/tools/handlers/backup-handler.js +451 -0
  14. package/build/tools/handlers/backup-policy-handler.js +275 -0
  15. package/build/tools/handlers/backup-vault-handler.js +370 -0
  16. package/build/tools/handlers/kms-config-handler.js +327 -0
  17. package/build/tools/handlers/operation-handler.js +254 -0
  18. package/build/tools/handlers/quota-rule-handler.js +411 -0
  19. package/build/tools/handlers/replication-handler.js +504 -0
  20. package/build/tools/handlers/snapshot-handler.js +320 -0
  21. package/build/tools/handlers/storage-pool-handler.js +346 -0
  22. package/build/tools/handlers/volume-handler.js +353 -0
  23. package/build/tools/kms-config-tools.js +162 -0
  24. package/build/tools/operation-tools.js +64 -0
  25. package/build/tools/quota-rule-tools.js +166 -0
  26. package/build/tools/replication-tools.js +227 -0
  27. package/build/tools/snapshot-tools.js +124 -0
  28. package/build/tools/storage-pool-tools.js +215 -0
  29. package/build/tools/volume-tools.js +216 -0
  30. package/build/types/tool.js +1 -0
  31. package/build/utils/netapp-client-factory.js +53 -0
  32. package/gemini-extension.json +12 -0
  33. package/package.json +66 -0
@@ -0,0 +1,166 @@
1
+ import { z } from 'zod';
2
+ // Create Quota Rule Tool
3
+ export const createQuotaRuleTool = {
4
+ name: 'gcnv_quota_rule_create',
5
+ title: 'Create Quota Rule',
6
+ description: 'Creates a new quota rule for a volume',
7
+ inputSchema: {
8
+ projectId: z.string().describe('The ID of the Google Cloud project'),
9
+ location: z.string().describe('The location of the volume'),
10
+ volumeId: z.string().describe('The ID of the volume'),
11
+ quotaRuleId: z.string().describe('The ID to assign to the quota rule'),
12
+ target: z.string().describe('The POSIX user/group this rule targets'),
13
+ // Accept either enum name or numeric value
14
+ quotaType: z
15
+ .union([
16
+ z.enum([
17
+ 'TYPE_UNSPECIFIED',
18
+ 'INDIVIDUAL_USER_QUOTA',
19
+ 'INDIVIDUAL_GROUP_QUOTA',
20
+ 'DEFAULT_USER_QUOTA',
21
+ 'DEFAULT_GROUP_QUOTA',
22
+ ]),
23
+ z.number(),
24
+ ])
25
+ .describe('Quota rule type (enum name or number)'),
26
+ // Temporary alias to allow callers to pass 'type' directly
27
+ type: z
28
+ .union([
29
+ z.enum([
30
+ 'TYPE_UNSPECIFIED',
31
+ 'INDIVIDUAL_USER_QUOTA',
32
+ 'INDIVIDUAL_GROUP_QUOTA',
33
+ 'DEFAULT_USER_QUOTA',
34
+ 'DEFAULT_GROUP_QUOTA',
35
+ ]),
36
+ z.number(),
37
+ ])
38
+ .optional()
39
+ .describe('Quota rule type (enum name or number)'),
40
+ diskLimitMib: z.number().describe('Quota size in MiB'),
41
+ description: z.string().optional().describe('Optional description'),
42
+ labels: z.record(z.string()).optional().describe('Optional labels'),
43
+ },
44
+ outputSchema: {
45
+ name: z.string().describe('The name of the created quota rule'),
46
+ operationId: z.string().describe('The ID of the long-running operation'),
47
+ },
48
+ };
49
+ // Delete Quota Rule Tool
50
+ export const deleteQuotaRuleTool = {
51
+ name: 'gcnv_quota_rule_delete',
52
+ title: 'Delete Quota Rule',
53
+ description: 'Deletes a quota rule',
54
+ inputSchema: {
55
+ projectId: z.string().describe('The ID of the Google Cloud project'),
56
+ location: z.string().describe('The location of the volume'),
57
+ volumeId: z.string().describe('The ID of the volume'),
58
+ quotaRuleId: z.string().describe('The ID of the quota rule to delete'),
59
+ },
60
+ outputSchema: {
61
+ success: z.boolean().describe('Whether the deletion was successful'),
62
+ operationId: z.string().optional().describe('The ID of the long-running operation'),
63
+ },
64
+ };
65
+ // Get Quota Rule Tool
66
+ export const getQuotaRuleTool = {
67
+ name: 'gcnv_quota_rule_get',
68
+ title: 'Get Quota Rule',
69
+ description: 'Gets details of a specific quota rule',
70
+ inputSchema: {
71
+ projectId: z.string().describe('The ID of the Google Cloud project'),
72
+ location: z.string().describe('The location of the volume'),
73
+ volumeId: z.string().describe('The ID of the volume'),
74
+ quotaRuleId: z.string().describe('The ID of the quota rule to retrieve'),
75
+ },
76
+ outputSchema: {
77
+ name: z.string().describe('The name of the quota rule'),
78
+ quotaRuleId: z.string().describe('The ID of the quota rule'),
79
+ target: z.string().optional().describe('The POSIX user/group this rule targets'),
80
+ quotaType: z.number().optional().describe('Type of quota rule (enum number)'),
81
+ type: z.number().optional().describe('Type of quota rule (enum number)'),
82
+ diskLimitMib: z.number().optional().describe('Quota size in MiB'),
83
+ state: z.string().optional().describe('The current state'),
84
+ createTime: z.date().optional().describe('The creation timestamp'),
85
+ description: z.string().optional().describe('Description'),
86
+ labels: z.record(z.string()).optional().describe('Labels'),
87
+ },
88
+ };
89
+ // List Quota Rules Tool
90
+ export const listQuotaRulesTool = {
91
+ name: 'gcnv_quota_rule_list',
92
+ title: 'List Quota Rules',
93
+ description: 'Lists all quota rules for a volume',
94
+ inputSchema: {
95
+ projectId: z.string().describe('The ID of the Google Cloud project'),
96
+ location: z.string().describe('The location of the volume'),
97
+ volumeId: z.string().describe('The ID of the volume'),
98
+ filter: z.string().optional().describe('Filter expression'),
99
+ pageSize: z.number().optional().describe('Maximum number of items to return'),
100
+ pageToken: z.string().optional().describe('Page token from previous request'),
101
+ orderBy: z.string().optional().describe('Sort order'),
102
+ },
103
+ outputSchema: {
104
+ quotaRules: z
105
+ .array(z.object({
106
+ name: z.string().describe('The name of the quota rule'),
107
+ quotaRuleId: z.string().describe('The ID of the quota rule'),
108
+ target: z.string().optional().describe('The POSIX user/group this rule targets'),
109
+ quotaType: z.number().optional().describe('Type of quota rule (enum number)'),
110
+ type: z.number().optional().describe('Type of quota rule (enum number)'),
111
+ diskLimitMib: z.number().optional().describe('Quota size in MiB'),
112
+ state: z.string().optional().describe('The current state'),
113
+ createTime: z.date().optional().describe('The creation timestamp'),
114
+ description: z.string().optional().describe('Description'),
115
+ labels: z.record(z.string()).optional().describe('Labels'),
116
+ }))
117
+ .describe('List of quota rules'),
118
+ nextPageToken: z.string().optional().describe('Token for next page'),
119
+ },
120
+ };
121
+ // Update Quota Rule Tool
122
+ export const updateQuotaRuleTool = {
123
+ name: 'gcnv_quota_rule_update',
124
+ title: 'Update Quota Rule',
125
+ description: 'Updates a quota rule',
126
+ inputSchema: {
127
+ projectId: z.string().describe('The ID of the Google Cloud project'),
128
+ location: z.string().describe('The location of the volume'),
129
+ volumeId: z.string().describe('The ID of the volume'),
130
+ quotaRuleId: z.string().describe('The ID of the quota rule to update'),
131
+ target: z.string().optional().describe('The POSIX user/group this rule targets'),
132
+ quotaType: z
133
+ .union([
134
+ z.enum([
135
+ 'TYPE_UNSPECIFIED',
136
+ 'INDIVIDUAL_USER_QUOTA',
137
+ 'INDIVIDUAL_GROUP_QUOTA',
138
+ 'DEFAULT_USER_QUOTA',
139
+ 'DEFAULT_GROUP_QUOTA',
140
+ ]),
141
+ z.number(),
142
+ ])
143
+ .optional()
144
+ .describe('Type of quota rule (enum name or number)'),
145
+ type: z
146
+ .union([
147
+ z.enum([
148
+ 'TYPE_UNSPECIFIED',
149
+ 'INDIVIDUAL_USER_QUOTA',
150
+ 'INDIVIDUAL_GROUP_QUOTA',
151
+ 'DEFAULT_USER_QUOTA',
152
+ 'DEFAULT_GROUP_QUOTA',
153
+ ]),
154
+ z.number(),
155
+ ])
156
+ .optional()
157
+ .describe('Type of quota rule (enum name or number)'),
158
+ diskLimitMib: z.number().optional().describe('Quota size in MiB'),
159
+ description: z.string().optional().describe('New description'),
160
+ labels: z.record(z.string()).optional().describe('New labels'),
161
+ },
162
+ outputSchema: {
163
+ name: z.string().describe('The name of the updated quota rule'),
164
+ operationId: z.string().describe('The ID of the long-running operation'),
165
+ },
166
+ };
@@ -0,0 +1,227 @@
1
+ import { z } from 'zod';
2
+ // Create Replication Tool
3
+ export const createReplicationTool = {
4
+ name: 'gcnv_replication_create',
5
+ title: 'Create Replication',
6
+ description: 'Creates a new replication between volumes. Only supported region pairs/region-groups are allowed; see https://docs.cloud.google.com/netapp/volumes/docs/protect-data/about-volume-replication',
7
+ inputSchema: {
8
+ projectId: z.string().describe('The ID of the Google Cloud project'),
9
+ location: z.string().describe('The location where the replication should be created'),
10
+ replicationId: z.string().describe('The ID to assign to the replication'),
11
+ sourceVolumeId: z.string().describe('The ID of the source volume to replicate from'),
12
+ destinationStoragePool: z.string().describe('The full path of destination storage pool'),
13
+ replicationSchedule: z
14
+ .enum(['EVERY_10_MINUTES', 'HOURLY', 'DAILY'])
15
+ .default('HOURLY')
16
+ .describe('Replication schedule; defaults to HOURLY'),
17
+ description: z.string().optional().describe('Optional description of the replication'),
18
+ labels: z.record(z.string()).optional().describe('Optional labels to apply to the replication'),
19
+ },
20
+ outputSchema: {
21
+ name: z.string().describe('The name of the created replication'),
22
+ operationId: z
23
+ .string()
24
+ .describe('The ID of the long-running operation for creating the replication'),
25
+ },
26
+ };
27
+ // Delete Replication Tool
28
+ export const deleteReplicationTool = {
29
+ name: 'gcnv_replication_delete',
30
+ title: 'Delete Replication',
31
+ description: 'Deletes a replication configuration',
32
+ inputSchema: {
33
+ projectId: z.string().describe('The ID of the Google Cloud project'),
34
+ location: z.string().describe('The location of the replication'),
35
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
36
+ replicationId: z.string().describe('The ID of the replication to delete'),
37
+ },
38
+ outputSchema: {
39
+ success: z.boolean().describe('Whether the deletion was successful'),
40
+ operationId: z.string().optional().describe('The ID of the long-running operation'),
41
+ },
42
+ };
43
+ // Get Replication Tool
44
+ export const getReplicationTool = {
45
+ name: 'gcnv_replication_get',
46
+ title: 'Get Replication',
47
+ description: 'Gets details of a specific replication',
48
+ inputSchema: {
49
+ projectId: z.string().describe('The ID of the Google Cloud project'),
50
+ location: z.string().describe('The location of the replication'),
51
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
52
+ replicationId: z.string().describe('The ID of the replication to retrieve'),
53
+ },
54
+ outputSchema: {
55
+ name: z.string().describe('The name of the replication'),
56
+ replicationId: z.string().describe('The ID of the replication'),
57
+ sourceVolume: z.string().describe('The source volume of the replication'),
58
+ destinationVolume: z.string().describe('The destination volume of the replication'),
59
+ state: z.string().describe('The current state of the replication'),
60
+ createTime: z.date().describe('The timestamp when the replication was created'),
61
+ description: z.string().optional().describe('The description of the replication'),
62
+ labels: z.record(z.string()).optional().describe('Labels applied to the replication'),
63
+ healthy: z.boolean().describe('Whether the replication is healthy'),
64
+ lastReplicationTime: z
65
+ .date()
66
+ .optional()
67
+ .describe('The timestamp of the last successful replication'),
68
+ },
69
+ };
70
+ // List Replications Tool
71
+ export const listReplicationsTool = {
72
+ name: 'gcnv_replication_list',
73
+ title: 'List Replications',
74
+ description: 'Lists all replications in the specified location',
75
+ inputSchema: {
76
+ projectId: z.string().describe('The ID of the Google Cloud project'),
77
+ location: z.string().describe('The location to list replications from'),
78
+ volumeId: z.string().describe('The ID of the volume for which the replications are listed'),
79
+ filter: z.string().optional().describe('Filter expression for filtering results'),
80
+ pageSize: z.number().optional().describe('The maximum number of replications to return'),
81
+ pageToken: z.string().optional().describe('Page token from a previous list request'),
82
+ },
83
+ outputSchema: {
84
+ replications: z
85
+ .array(z.object({
86
+ name: z.string().describe('The name of the replication'),
87
+ replicationId: z.string().describe('The ID of the replication'),
88
+ sourceVolume: z.string().describe('The source volume of the replication'),
89
+ destinationVolume: z.string().describe('The destination volume of the replication'),
90
+ state: z.string().describe('The current state of the replication'),
91
+ createTime: z.date().describe('The timestamp when the replication was created'),
92
+ description: z.string().optional().describe('The description of the replication'),
93
+ labels: z.record(z.string()).optional().describe('Labels applied to the replication'),
94
+ healthy: z.boolean().describe('Whether the replication is healthy'),
95
+ lastReplicationTime: z
96
+ .date()
97
+ .optional()
98
+ .describe('The timestamp of the last successful replication'),
99
+ }))
100
+ .describe('List of replications'),
101
+ nextPageToken: z.string().optional().describe('Token to retrieve the next page of results'),
102
+ },
103
+ };
104
+ // Update Replication Tool
105
+ export const updateReplicationTool = {
106
+ name: 'gcnv_replication_update',
107
+ title: 'Update Replication',
108
+ description: 'Updates a replication configuration',
109
+ inputSchema: {
110
+ projectId: z.string().describe('The ID of the Google Cloud project'),
111
+ location: z.string().describe('The location of the replication'),
112
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
113
+ replicationId: z.string().describe('The ID of the replication to update'),
114
+ description: z.string().optional().describe('New description of the replication'),
115
+ labels: z.record(z.string()).optional().describe('New labels to apply to the replication'),
116
+ },
117
+ outputSchema: {
118
+ name: z.string().describe('The name of the updated replication'),
119
+ operationId: z
120
+ .string()
121
+ .optional()
122
+ .describe('The ID of the long-running operation for updating the replication'),
123
+ },
124
+ };
125
+ // Resume Replication Tool
126
+ export const resumeReplicationTool = {
127
+ name: 'gcnv_replication_resume',
128
+ title: 'Resume Replication',
129
+ description: 'Resumes a paused replication',
130
+ inputSchema: {
131
+ projectId: z.string().describe('The ID of the Google Cloud project'),
132
+ location: z.string().describe('The location of the replication'),
133
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
134
+ replicationId: z.string().describe('The ID of the replication to resume'),
135
+ },
136
+ outputSchema: {
137
+ name: z.string().describe('The name of the replication'),
138
+ operationId: z
139
+ .string()
140
+ .describe('The ID of the long-running operation for resuming the replication'),
141
+ },
142
+ };
143
+ // Stop Replication Tool
144
+ export const stopReplicationTool = {
145
+ name: 'gcnv_replication_stop',
146
+ title: 'Stop Replication',
147
+ description: 'Stops an active replication',
148
+ inputSchema: {
149
+ projectId: z.string().describe('The ID of the Google Cloud project'),
150
+ location: z.string().describe('The location of the replication'),
151
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
152
+ replicationId: z.string().describe('The ID of the replication to stop'),
153
+ },
154
+ outputSchema: {
155
+ name: z.string().describe('The name of the replication'),
156
+ operationId: z
157
+ .string()
158
+ .describe('The ID of the long-running operation for stopping the replication'),
159
+ },
160
+ };
161
+ // Reverse Replication Direction Tool
162
+ export const reverseReplicationDirectionTool = {
163
+ name: 'gcnv_replication_reverse_direction',
164
+ title: 'Reverse Replication Direction',
165
+ description: 'Reverses the direction of an existing replication',
166
+ inputSchema: {
167
+ projectId: z.string().describe('The ID of the Google Cloud project'),
168
+ location: z.string().describe('The location of the replication'),
169
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
170
+ replicationId: z.string().describe('The ID of the replication to reverse'),
171
+ },
172
+ outputSchema: {
173
+ name: z.string().describe('The name of the replication'),
174
+ operationId: z
175
+ .string()
176
+ .describe('The ID of the long-running operation for reversing the replication direction'),
177
+ },
178
+ };
179
+ // Establish Peering Tool
180
+ export const establishPeeringTool = {
181
+ name: 'gcnv_replication_establish_peering',
182
+ title: 'Establish Replication Peering',
183
+ description: 'Establishes replication peering between clusters',
184
+ inputSchema: {
185
+ projectId: z.string().describe('The ID of the Google Cloud project'),
186
+ location: z.string().describe('The location of the replication'),
187
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
188
+ replicationId: z.string().describe('The ID of the replication'),
189
+ peerClusterName: z
190
+ .string()
191
+ .describe("Name of the user's local source cluster to be peered with the destination cluster"),
192
+ peerSvmName: z
193
+ .string()
194
+ .describe("Name of the user's local source vserver svm to be peered with the destination vserver svm"),
195
+ peerVolumeName: z
196
+ .string()
197
+ .describe("Name of the user's local source volume to be peered with the destination volume"),
198
+ peerIpAddresses: z
199
+ .array(z.string())
200
+ .optional()
201
+ .describe('Optional list of IPv4 ip addresses to be used for peering'),
202
+ },
203
+ outputSchema: {
204
+ name: z.string().describe('The name of the replication'),
205
+ operationId: z
206
+ .string()
207
+ .describe('The ID of the long-running operation for establishing peering'),
208
+ },
209
+ };
210
+ // Sync Replication Tool
211
+ export const syncReplicationTool = {
212
+ name: 'gcnv_replication_sync',
213
+ title: 'Sync Replication',
214
+ description: 'Syncs the replication - invokes one time volume data transfer from source to destination',
215
+ inputSchema: {
216
+ projectId: z.string().describe('The ID of the Google Cloud project'),
217
+ location: z.string().describe('The location of the replication'),
218
+ volumeId: z.string().describe('The ID of the volume containing the replication'),
219
+ replicationId: z.string().describe('The ID of the replication to sync'),
220
+ },
221
+ outputSchema: {
222
+ name: z.string().describe('The name of the replication'),
223
+ operationId: z
224
+ .string()
225
+ .describe('The ID of the long-running operation for syncing the replication'),
226
+ },
227
+ };
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ // Create Snapshot Tool
3
+ export const createSnapshotTool = {
4
+ name: 'gcnv_snapshot_create',
5
+ title: 'Create Snapshot',
6
+ description: 'Creates a new snapshot of the specified volume',
7
+ inputSchema: {
8
+ projectId: z.string().describe('The ID of the Google Cloud project'),
9
+ location: z.string().describe('The location of the volume'),
10
+ volumeId: z.string().describe('The ID of the volume to snapshot'),
11
+ snapshotId: z.string().describe('The ID to assign to the snapshot'),
12
+ description: z.string().optional().describe('Optional description of the snapshot'),
13
+ labels: z.record(z.string()).optional().describe('Optional labels to apply to the snapshot'),
14
+ },
15
+ outputSchema: {
16
+ name: z.string().describe('The name of the created snapshot'),
17
+ operationId: z
18
+ .string()
19
+ .describe('The ID of the long-running operation for creating the snapshot'),
20
+ },
21
+ };
22
+ // Delete Snapshot Tool
23
+ export const deleteSnapshotTool = {
24
+ name: 'gcnv_snapshot_delete',
25
+ title: 'Delete Snapshot',
26
+ description: 'Deletes a snapshot of a volume',
27
+ inputSchema: {
28
+ projectId: z.string().describe('The ID of the Google Cloud project'),
29
+ location: z.string().describe('The location of the volume'),
30
+ volumeId: z.string().describe('The ID of the volume containing the snapshot'),
31
+ snapshotId: z.string().describe('The ID of the snapshot to delete'),
32
+ },
33
+ outputSchema: {
34
+ success: z.boolean().describe('Whether the deletion was successful'),
35
+ operationId: z.string().optional().describe('The ID of the long-running operation'),
36
+ },
37
+ };
38
+ // Get Snapshot Tool
39
+ export const getSnapshotTool = {
40
+ name: 'gcnv_snapshot_get',
41
+ title: 'Get Snapshot',
42
+ description: 'Gets details of a specific snapshot',
43
+ inputSchema: {
44
+ projectId: z.string().describe('The ID of the Google Cloud project'),
45
+ location: z.string().describe('The location of the volume'),
46
+ volumeId: z.string().describe('The ID of the volume containing the snapshot'),
47
+ snapshotId: z.string().describe('The ID of the snapshot to retrieve'),
48
+ },
49
+ outputSchema: {
50
+ name: z.string().describe('The name of the snapshot'),
51
+ snapshotId: z.string().describe('The ID of the snapshot'),
52
+ volumeId: z.string().describe('The ID of the source volume'),
53
+ state: z.string().describe('The current state of the snapshot'),
54
+ createTime: z.date().describe('The timestamp when the snapshot was created'),
55
+ description: z.string().optional().describe('The description of the snapshot'),
56
+ labels: z.record(z.string()).optional().describe('Labels applied to the snapshot'),
57
+ },
58
+ };
59
+ // List Snapshots Tool
60
+ export const listSnapshotsTool = {
61
+ name: 'gcnv_snapshot_list',
62
+ title: 'List Snapshots',
63
+ description: 'Lists all snapshots for a specified volume',
64
+ inputSchema: {
65
+ projectId: z.string().describe('The ID of the Google Cloud project'),
66
+ location: z.string().describe('The location of the volume'),
67
+ volumeId: z.string().describe('The ID of the volume to list snapshots from'),
68
+ filter: z.string().optional().describe('Filter expression for filtering results'),
69
+ pageSize: z.number().optional().describe('The maximum number of snapshots to return'),
70
+ pageToken: z.string().optional().describe('Page token from a previous list request'),
71
+ },
72
+ outputSchema: {
73
+ snapshots: z
74
+ .array(z.object({
75
+ name: z.string().describe('The name of the snapshot'),
76
+ snapshotId: z.string().describe('The ID of the snapshot'),
77
+ volumeId: z.string().describe('The ID of the source volume'),
78
+ state: z.string().describe('The current state of the snapshot'),
79
+ createTime: z.date().describe('The timestamp when the snapshot was created'),
80
+ description: z.string().optional().describe('The description of the snapshot'),
81
+ labels: z.record(z.string()).optional().describe('Labels applied to the snapshot'),
82
+ }))
83
+ .describe('List of snapshots'),
84
+ nextPageToken: z.string().optional().describe('Token to retrieve the next page of results'),
85
+ },
86
+ };
87
+ // Revert Volume to Snapshot Tool
88
+ export const revertVolumeToSnapshotTool = {
89
+ name: 'gcnv_snapshot_revert',
90
+ title: 'Revert Volume to Snapshot',
91
+ description: 'Reverts a volume to a previous snapshot state',
92
+ inputSchema: {
93
+ projectId: z.string().describe('The ID of the Google Cloud project'),
94
+ location: z.string().describe('The location of the volume'),
95
+ volumeId: z.string().describe('The ID of the volume to revert'),
96
+ snapshotId: z.string().describe('The ID of the snapshot to revert to'),
97
+ },
98
+ outputSchema: {
99
+ success: z.boolean().describe('Whether the revert operation was successful'),
100
+ operationId: z
101
+ .string()
102
+ .describe('The ID of the long-running operation for reverting the volume'),
103
+ },
104
+ };
105
+ // Update Snapshot Tool
106
+ export const updateSnapshotTool = {
107
+ name: 'gcnv_snapshot_update',
108
+ title: 'Update Snapshot',
109
+ description: 'Updates the settings of a specific snapshot',
110
+ inputSchema: {
111
+ projectId: z.string().describe('The ID of the Google Cloud project'),
112
+ location: z.string().describe('The location of the volume'),
113
+ volumeId: z.string().describe('The ID of the volume containing the snapshot'),
114
+ snapshotId: z.string().describe('The ID of the snapshot to update'),
115
+ description: z.string().optional().describe('New description of the snapshot'),
116
+ labels: z.record(z.string()).optional().describe('New labels to apply to the snapshot'),
117
+ },
118
+ outputSchema: {
119
+ name: z.string().describe('The name of the updated snapshot'),
120
+ operationId: z
121
+ .string()
122
+ .describe('The ID of the long-running operation for updating the snapshot'),
123
+ },
124
+ };