@gcnv/gcnv-mcp-server 1.1.5

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 (35) hide show
  1. package/GEMINI.md +253 -0
  2. package/LICENSE +201 -0
  3. package/README.md +493 -0
  4. package/build/index.js +185 -0
  5. package/build/logger.js +19 -0
  6. package/build/registry/register-tools.js +110 -0
  7. package/build/registry/tool-registry.js +39 -0
  8. package/build/tools/active-directory-tools.js +132 -0
  9. package/build/tools/backup-policy-tools.js +140 -0
  10. package/build/tools/backup-tools.js +206 -0
  11. package/build/tools/backup-vault-tools.js +197 -0
  12. package/build/tools/handlers/active-directory-handler.js +327 -0
  13. package/build/tools/handlers/backup-handler.js +534 -0
  14. package/build/tools/handlers/backup-policy-handler.js +275 -0
  15. package/build/tools/handlers/backup-vault-handler.js +374 -0
  16. package/build/tools/handlers/host-group-handler.js +413 -0
  17. package/build/tools/handlers/kms-config-handler.js +321 -0
  18. package/build/tools/handlers/operation-handler.js +254 -0
  19. package/build/tools/handlers/quota-rule-handler.js +411 -0
  20. package/build/tools/handlers/replication-handler.js +504 -0
  21. package/build/tools/handlers/snapshot-handler.js +320 -0
  22. package/build/tools/handlers/storage-pool-handler.js +534 -0
  23. package/build/tools/handlers/volume-handler.js +562 -0
  24. package/build/tools/host-group-tools.js +134 -0
  25. package/build/tools/kms-config-tools.js +156 -0
  26. package/build/tools/operation-tools.js +64 -0
  27. package/build/tools/quota-rule-tools.js +166 -0
  28. package/build/tools/replication-tools.js +227 -0
  29. package/build/tools/snapshot-tools.js +124 -0
  30. package/build/tools/storage-pool-tools.js +271 -0
  31. package/build/tools/volume-tools.js +479 -0
  32. package/build/types/tool.js +1 -0
  33. package/build/utils/netapp-client-factory.js +64 -0
  34. package/gemini-extension.json +12 -0
  35. package/package.json +73 -0
@@ -0,0 +1,156 @@
1
+ import { z } from 'zod';
2
+ // Create KMS Config Tool
3
+ export const createKmsConfigTool = {
4
+ name: 'gcnv_kms_config_create',
5
+ title: 'Create KMS Config',
6
+ description: 'Creates a new KMS (Key Management Service) configuration',
7
+ inputSchema: {
8
+ projectId: z.string().describe('The ID of the Google Cloud project'),
9
+ location: z.string().describe('The location where the KMS config should be created'),
10
+ kmsConfigId: z.string().describe('The ID to assign to the KMS config'),
11
+ cryptoKeyName: z.string().describe('The full name of the crypto key'),
12
+ description: z.string().optional().describe('Optional description'),
13
+ labels: z.record(z.string()).optional().describe('Optional labels'),
14
+ },
15
+ outputSchema: {
16
+ name: z.string().describe('The name of the created KMS config'),
17
+ operationId: z.string().describe('The ID of the long-running operation'),
18
+ },
19
+ };
20
+ // Delete KMS Config Tool
21
+ export const deleteKmsConfigTool = {
22
+ name: 'gcnv_kms_config_delete',
23
+ title: 'Delete KMS Config',
24
+ description: 'Deletes a KMS configuration',
25
+ inputSchema: {
26
+ projectId: z.string().describe('The ID of the Google Cloud project'),
27
+ location: z.string().describe('The location of the KMS config'),
28
+ kmsConfigId: z.string().describe('The ID of the KMS config to delete'),
29
+ },
30
+ outputSchema: {
31
+ success: z.boolean().describe('Whether the deletion was successful'),
32
+ operationId: z.string().optional().describe('The ID of the long-running operation'),
33
+ },
34
+ };
35
+ // Get KMS Config Tool
36
+ export const getKmsConfigTool = {
37
+ name: 'gcnv_kms_config_get',
38
+ title: 'Get KMS Config',
39
+ description: 'Gets details of a specific KMS configuration',
40
+ inputSchema: {
41
+ projectId: z.string().describe('The ID of the Google Cloud project'),
42
+ location: z.string().describe('The location of the KMS config'),
43
+ kmsConfigId: z.string().describe('The ID of the KMS config to retrieve'),
44
+ },
45
+ outputSchema: {
46
+ name: z.string().describe('The name of the KMS config'),
47
+ kmsConfigId: z.string().describe('The ID of the KMS config'),
48
+ cryptoKeyName: z.string().optional().describe('The name of the crypto key'),
49
+ state: z
50
+ .string()
51
+ .optional()
52
+ .describe('The current state (e.g., READY, KEY_CHECK_PENDING—run instructions if pending)'),
53
+ instructions: z
54
+ .string()
55
+ .optional()
56
+ .describe('Steps to grant the service account access when state is KEY_CHECK_PENDING'),
57
+ stateDetails: z
58
+ .string()
59
+ .optional()
60
+ .describe('Additional state details when the KMS config is not ready'),
61
+ createTime: z.date().optional().describe('The creation timestamp'),
62
+ description: z.string().optional().describe('Description'),
63
+ labels: z.record(z.string()).optional().describe('Labels'),
64
+ serviceAccount: z
65
+ .string()
66
+ .optional()
67
+ .describe('Service account used by NetApp to access the KMS key'),
68
+ },
69
+ };
70
+ // List KMS Configs Tool
71
+ export const listKmsConfigsTool = {
72
+ name: 'gcnv_kms_config_list',
73
+ title: 'List KMS Configs',
74
+ description: 'Lists all KMS configurations 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 KMS configs from'),
78
+ filter: z.string().optional().describe('Filter expression'),
79
+ pageSize: z.number().optional().describe('Maximum number of items to return'),
80
+ pageToken: z.string().optional().describe('Page token from previous request'),
81
+ orderBy: z.string().optional().describe('Sort order'),
82
+ },
83
+ outputSchema: {
84
+ kmsConfigs: z
85
+ .array(z.object({
86
+ name: z.string().describe('The name of the KMS config'),
87
+ kmsConfigId: z.string().describe('The ID of the KMS config'),
88
+ cryptoKeyName: z.string().optional().describe('The name of the crypto key'),
89
+ state: z
90
+ .string()
91
+ .optional()
92
+ .describe('The current state (e.g., READY, KEY_CHECK_PENDING)'),
93
+ stateDetails: z
94
+ .string()
95
+ .optional()
96
+ .describe('Additional state details when the KMS config is not ready'),
97
+ createTime: z.date().optional().describe('The creation timestamp'),
98
+ description: z.string().optional().describe('Description'),
99
+ labels: z.record(z.string()).optional().describe('Labels'),
100
+ serviceAccount: z
101
+ .string()
102
+ .optional()
103
+ .describe('Service account used by NetApp to access the KMS key'),
104
+ }))
105
+ .describe('List of KMS configs'),
106
+ nextPageToken: z.string().optional().describe('Token for next page'),
107
+ },
108
+ };
109
+ // Update KMS Config Tool
110
+ export const updateKmsConfigTool = {
111
+ name: 'gcnv_kms_config_update',
112
+ title: 'Update KMS Config',
113
+ description: 'Updates a KMS configuration',
114
+ inputSchema: {
115
+ projectId: z.string().describe('The ID of the Google Cloud project'),
116
+ location: z.string().describe('The location of the KMS config'),
117
+ kmsConfigId: z.string().describe('The ID of the KMS config to update'),
118
+ cryptoKeyName: z.string().optional().describe('The name of the crypto key'),
119
+ description: z.string().optional().describe('New description'),
120
+ labels: z.record(z.string()).optional().describe('New labels'),
121
+ },
122
+ outputSchema: {
123
+ name: z.string().describe('The name of the updated KMS config'),
124
+ operationId: z.string().describe('The ID of the long-running operation'),
125
+ },
126
+ };
127
+ // Verify KMS Config Tool
128
+ export const verifyKmsConfigTool = {
129
+ name: 'gcnv_kms_config_verify',
130
+ title: 'Verify KMS Config',
131
+ description: 'Verifies KMS config reachability after granting CMEK permissions; typically run after following the instructions returned by gcnv_kms_config_get when state is KEY_CHECK_PENDING',
132
+ inputSchema: {
133
+ projectId: z.string().describe('The ID of the Google Cloud project'),
134
+ location: z.string().describe('The location of the KMS config'),
135
+ kmsConfigId: z.string().describe('The ID of the KMS config to verify'),
136
+ },
137
+ outputSchema: {
138
+ reachable: z.boolean().optional().describe('Whether the KMS config is reachable'),
139
+ healthError: z.string().optional().describe('Health error if any'),
140
+ },
141
+ };
142
+ // Encrypt Volumes Tool
143
+ export const encryptVolumesTool = {
144
+ name: 'gcnv_kms_config_encrypt_volumes',
145
+ title: 'Encrypt Volumes',
146
+ description: 'Encrypts existing volumes without CMEK encryption with the desired KMS config',
147
+ inputSchema: {
148
+ projectId: z.string().describe('The ID of the Google Cloud project'),
149
+ location: z.string().describe('The location of the KMS config'),
150
+ kmsConfigId: z.string().describe('The ID of the KMS config to use for encryption'),
151
+ },
152
+ outputSchema: {
153
+ name: z.string().describe('The name of the KMS config'),
154
+ operationId: z.string().describe('The ID of the long-running operation'),
155
+ },
156
+ };
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ // Get Operation Tool
3
+ export const getOperationTool = {
4
+ name: 'gcnv_operation_get',
5
+ title: 'Get Operation',
6
+ description: 'Get details of a long-running operation by its ID',
7
+ inputSchema: {
8
+ operationName: z.string().describe('The full name of the operation to retrieve'),
9
+ },
10
+ outputSchema: {
11
+ name: z.string().describe('The name of the operation'),
12
+ done: z.boolean().describe('Whether the operation is complete'),
13
+ success: z.boolean().describe('True when done is true; done determines the final result'),
14
+ metadata: z.record(z.any()).optional().describe('Metadata about the operation'),
15
+ error: z.record(z.any()).optional().describe('Error details if the operation failed'),
16
+ response: z.record(z.any()).optional().describe('The response if the operation succeeded'),
17
+ createTime: z.string().optional().describe('When the operation was created'),
18
+ target: z.string().optional().describe('The target resource of the operation'),
19
+ verb: z.string().optional().describe('The operation verb (create, update, delete)'),
20
+ statusMessage: z.string().optional().describe('Current status message of the operation'),
21
+ cancelRequested: z.boolean().optional().describe('Whether cancellation was requested'),
22
+ apiVersion: z.string().optional().describe('API version used for the operation'),
23
+ },
24
+ };
25
+ // Cancel Operation Tool
26
+ export const cancelOperationTool = {
27
+ name: 'gcnv_operation_cancel',
28
+ title: 'Cancel Operation',
29
+ description: 'Cancels a long-running operation that is still in progress',
30
+ inputSchema: {
31
+ operationName: z.string().describe('The full name of the operation to cancel'),
32
+ },
33
+ outputSchema: {
34
+ success: z.boolean().describe('Whether the cancellation request was successful'),
35
+ message: z.string().describe('Status message about the cancellation attempt'),
36
+ },
37
+ };
38
+ // List Operations Tool
39
+ export const listOperationsTool = {
40
+ name: 'gcnv_operation_list',
41
+ title: 'List Operations',
42
+ description: 'Lists all active long-running operations in the project',
43
+ inputSchema: {
44
+ projectId: z.string().describe('The ID of the Google Cloud project'),
45
+ location: z.string().describe('The location to list operations from'),
46
+ filter: z.string().optional().describe('Filter expression for operations'),
47
+ pageSize: z.number().optional().describe('The maximum number of operations to return'),
48
+ pageToken: z.string().optional().describe('Page token from a previous list request'),
49
+ },
50
+ outputSchema: {
51
+ operations: z
52
+ .array(z.object({
53
+ name: z.string().describe('The name of the operation'),
54
+ done: z.boolean().describe('Whether the operation is complete'),
55
+ success: z.boolean().describe('True when done is true; done determines the final result'),
56
+ target: z.string().optional().describe('The target resource of the operation'),
57
+ verb: z.string().optional().describe('The operation verb (create, update, delete)'),
58
+ createTime: z.string().optional().describe('When the operation was created'),
59
+ statusMessage: z.string().optional().describe('Current status message of the operation'),
60
+ }))
61
+ .describe('List of operations'),
62
+ nextPageToken: z.string().optional().describe('Token to retrieve the next page of results'),
63
+ },
64
+ };
@@ -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
+ };