@@ -22,11 +22,10 @@ export const GetModulesSchema = z.object({
2222// Schema for creating a module
2323export const CreateModuleSchema = z . object ( {
2424 name : z . string ( ) . describe ( "Module name" ) ,
25- description : z . string ( ) . optional ( ) . describe ( "Module description" ) ,
26- code : z . string ( ) . describe ( "Module source code" ) ,
27- language : z . enum ( [ "javascript" , "python" ] ) . describe ( "Programming language" ) ,
28- tags : z . array ( z . string ( ) ) . optional ( ) . describe ( "Module tags" ) ,
29- settings : z . record ( z . any ( ) ) . optional ( ) . describe ( "Module settings" ) ,
25+ programmingLanguage : z
26+ . enum ( [ "JAVASCRIPT" , "PYTHON" ] )
27+ . describe ( "Programming language" ) ,
28+ sourceCode : z . string ( ) . describe ( "Module source code" ) ,
3029} ) ;
3130
3231// Schema for getting a specific module
@@ -204,30 +203,17 @@ export const modulesToolDefinitions = [
204203 type : "string" ,
205204 description : "Module name" ,
206205 } ,
207- description : {
206+ programmingLanguage : {
208207 type : "string" ,
209- description : "Module description" ,
208+ enum : [ "JAVASCRIPT" , "PYTHON" ] ,
209+ description : "Programming language" ,
210210 } ,
211- code : {
211+ sourceCode : {
212212 type : "string" ,
213213 description : "Module source code" ,
214214 } ,
215- language : {
216- type : "string" ,
217- enum : [ "javascript" , "python" ] ,
218- description : "Programming language" ,
219- } ,
220- tags : {
221- type : "array" ,
222- items : { type : "string" } ,
223- description : "Module tags" ,
224- } ,
225- settings : {
226- type : "object" ,
227- description : "Module settings" ,
228- } ,
229215 } ,
230- required : [ "name" , "code " , "language " ] ,
216+ required : [ "name" , "programmingLanguage " , "sourceCode " ] ,
231217 } ,
232218 } ,
233219 {
@@ -452,6 +438,10 @@ export const modulesWithVersionsToolDefinitions = [
452438 inputSchema : {
453439 type : "object" ,
454440 properties : {
441+ moduleId : {
442+ type : "string" ,
443+ description : "Module ID" ,
444+ } ,
455445 aliasId : {
456446 type : "string" ,
457447 description : "Alias ID" ,
@@ -468,6 +458,10 @@ export const modulesWithVersionsToolDefinitions = [
468458 inputSchema : {
469459 type : "object" ,
470460 properties : {
461+ moduleId : {
462+ type : "string" ,
463+ description : "Module ID" ,
464+ } ,
471465 aliasId : {
472466 type : "string" ,
473467 description : "Alias ID" ,
0 commit comments