@@ -38,6 +38,27 @@ export const GetModuleSchema = z.object({
3838 ) ,
3939} ) ;
4040
41+ // Schema for updating a module
42+ export const UpdateModuleSchema = z . object ( {
43+ id : z
44+ . string ( )
45+ . describe (
46+ "Unique identifier (UUID) of the script library module to update"
47+ ) ,
48+ name : z
49+ . string ( )
50+ . optional ( )
51+ . describe (
52+ "The name of the script library. Must not have spaces, dashes and dots are allowed"
53+ ) ,
54+ sourceCode : z
55+ . string ( )
56+ . optional ( )
57+ . describe (
58+ "The updated source code of the script library module. This is the reusable code that can be imported by processes."
59+ ) ,
60+ } ) ;
61+
4162// Schema for deleting a module
4263export const DeleteModuleSchema = z . object ( {
4364 id : z
@@ -73,6 +94,14 @@ export const DeleteModuleVersionSchema = z.object({
7394 versionId : z . string ( ) . describe ( "Version ID" ) ,
7495} ) ;
7596
97+ // Schema for publishing a module version
98+ export const PublishModuleVersionSchema = z . object ( {
99+ moduleId : z . string ( ) . describe ( "Module ID" ) ,
100+ tag : z . string ( ) . optional ( ) . describe ( "Version tag" ) ,
101+ comment : z . string ( ) . optional ( ) . describe ( "Version comment" ) ,
102+ sourceCode : z . string ( ) . optional ( ) . describe ( "Module source code" ) ,
103+ } ) ;
104+
76105// Schema for getting module aliases
77106export const GetModuleAliasesSchema = z . object ( {
78107 moduleId : z . string ( ) . describe ( "Module ID" ) ,
@@ -88,16 +117,54 @@ export const GetModuleAliasesSchema = z.object({
88117 . describe ( "Amount of items to retrieve" ) ,
89118} ) ;
90119
120+ // Schema for creating a module version alias
121+ export const CreateModuleVersionAliasSchema = z . object ( {
122+ moduleId : z . string ( ) . describe ( "Module ID" ) ,
123+ name : z . string ( ) . describe ( "Alias name" ) ,
124+ versionId : z
125+ . string ( )
126+ . describe ( "The version id of the script library being aliased" ) ,
127+ } ) ;
128+
129+ // Schema for getting a specific module version alias
130+ export const GetModuleVersionAliasSchema = z . object ( {
131+ moduleId : z . string ( ) . describe ( "Module ID" ) ,
132+ aliasId : z . string ( ) . describe ( "Alias ID" ) ,
133+ } ) ;
134+
135+ // Schema for deleting a module version alias
136+ export const DeleteModuleVersionAliasSchema = z . object ( {
137+ moduleId : z . string ( ) . describe ( "Module ID" ) ,
138+ aliasId : z . string ( ) . describe ( "Alias ID" ) ,
139+ } ) ;
140+
141+ // Schema for updating a module version alias
142+ export const UpdateModuleVersionAliasSchema = z . object ( {
143+ moduleId : z . string ( ) . describe ( "Module ID" ) ,
144+ aliasId : z . string ( ) . describe ( "Alias ID" ) ,
145+ name : z . string ( ) . optional ( ) . describe ( "Alias name" ) ,
146+ versionId : z
147+ . string ( )
148+ . optional ( )
149+ . describe ( "The version id of the script library being aliased" ) ,
150+ } ) ;
151+
91152// Tool names
92153export const modulesToolNames = {
93154 getModules : "get_modules" ,
94155 createModule : "create_module" ,
95156 getModule : "get_module" ,
157+ updateModule : "update_module" ,
96158 deleteModule : "delete_module" ,
97159 getModuleVersions : "get_module_versions" ,
160+ publishModuleVersion : "publish_module_version" ,
98161 getModuleVersion : "get_module_version" ,
99162 deleteModuleVersion : "delete_module_version" ,
100163 getModuleAliases : "get_module_aliases" ,
164+ createModuleVersionAlias : "create_module_version_alias" ,
165+ getModuleVersionAlias : "get_module_version_alias" ,
166+ deleteModuleVersionAlias : "delete_module_version_alias" ,
167+ updateModuleVersionAlias : "update_module_version_alias" ,
101168} as const ;
102169
103170// Tool definitions
@@ -180,11 +247,38 @@ export const modulesToolDefinitions = [
180247 required : [ "id" ] ,
181248 } ,
182249 } ,
250+ {
251+ name : modulesToolNames . updateModule ,
252+ title : "Update Module" ,
253+ description :
254+ "Updates an existing script library module with new source code or metadata. All provided fields will replace the existing values." ,
255+ inputSchema : {
256+ type : "object" ,
257+ properties : {
258+ id : {
259+ type : "string" ,
260+ description :
261+ "Unique identifier (UUID) of the script library module to update" ,
262+ } ,
263+ name : {
264+ type : "string" ,
265+ description :
266+ "The name of the script library. Must not have spaces, dashes and dots are allowed" ,
267+ } ,
268+ sourceCode : {
269+ type : "string" ,
270+ description :
271+ "The updated source code of the script library module. This is the reusable code that can be imported by processes." ,
272+ } ,
273+ } ,
274+ required : [ "id" ] ,
275+ } ,
276+ } ,
183277 {
184278 name : modulesToolNames . deleteModule ,
185279 title : "Delete Module" ,
186280 description :
187- "Deletes a script library module and all its versions . This action cannot be undone." ,
281+ "Permanently deletes a script library module. This action cannot be undone and may affect processes that import this module ." ,
188282 inputSchema : {
189283 type : "object" ,
190284 properties : {
@@ -300,4 +394,114 @@ export const modulesWithVersionsToolDefinitions = [
300394 required : [ "moduleId" ] ,
301395 } ,
302396 } ,
397+ {
398+ name : modulesToolNames . publishModuleVersion ,
399+ title : "Publish Module Version" ,
400+ description : "Publishes a new version of a module." ,
401+ inputSchema : {
402+ type : "object" ,
403+ properties : {
404+ moduleId : {
405+ type : "string" ,
406+ description : "Module ID" ,
407+ } ,
408+ tag : {
409+ type : "string" ,
410+ description : "Version tag" ,
411+ } ,
412+ comment : {
413+ type : "string" ,
414+ description : "Version comment" ,
415+ } ,
416+ sourceCode : {
417+ type : "string" ,
418+ description : "Module source code" ,
419+ } ,
420+ } ,
421+ required : [ "moduleId" ] ,
422+ } ,
423+ } ,
424+ {
425+ name : modulesToolNames . createModuleVersionAlias ,
426+ title : "Create Module Version Alias" ,
427+ description : "Creates a new alias for a module version." ,
428+ inputSchema : {
429+ type : "object" ,
430+ properties : {
431+ moduleId : {
432+ type : "string" ,
433+ description : "Module ID" ,
434+ } ,
435+ name : {
436+ type : "string" ,
437+ description : "Alias name" ,
438+ } ,
439+ versionId : {
440+ type : "string" ,
441+ description : "The version id of the script library being aliased" ,
442+ } ,
443+ } ,
444+ required : [ "moduleId" , "name" , "versionId" ] ,
445+ } ,
446+ } ,
447+ {
448+ name : modulesToolNames . getModuleVersionAlias ,
449+ title : "Get Module Version Alias" ,
450+ description :
451+ "Retrieves detailed information about a specific module version alias." ,
452+ inputSchema : {
453+ type : "object" ,
454+ properties : {
455+ aliasId : {
456+ type : "string" ,
457+ description : "Alias ID" ,
458+ } ,
459+ } ,
460+ required : [ "moduleId" , "aliasId" ] ,
461+ } ,
462+ } ,
463+ {
464+ name : modulesToolNames . deleteModuleVersionAlias ,
465+ title : "Delete Module Version Alias" ,
466+ description :
467+ "Permanently deletes a module version alias. This action cannot be undone." ,
468+ inputSchema : {
469+ type : "object" ,
470+ properties : {
471+ aliasId : {
472+ type : "string" ,
473+ description : "Alias ID" ,
474+ } ,
475+ } ,
476+ required : [ "moduleId" , "aliasId" ] ,
477+ } ,
478+ } ,
479+ {
480+ name : modulesToolNames . updateModuleVersionAlias ,
481+ title : "Update Module Version Alias" ,
482+ description :
483+ "Updates an existing module version alias with new configuration. All provided fields will replace the existing values." ,
484+ inputSchema : {
485+ type : "object" ,
486+ properties : {
487+ moduleId : {
488+ type : "string" ,
489+ description : "Module ID" ,
490+ } ,
491+ aliasId : {
492+ type : "string" ,
493+ description : "Alias ID" ,
494+ } ,
495+ name : {
496+ type : "string" ,
497+ description : "Alias name" ,
498+ } ,
499+ versionId : {
500+ type : "string" ,
501+ description : "The version id of the script library being aliased" ,
502+ } ,
503+ } ,
504+ required : [ "moduleId" , "aliasId" ] ,
505+ } ,
506+ } ,
303507] ;
0 commit comments