@@ -14,6 +14,11 @@ import (
14
14
"github.com/mark3labs/mcp-go/server"
15
15
)
16
16
17
+ const (
18
+ DescriptionRepositoryOwner = "Repository owner"
19
+ DescriptionRepositoryName = "Repository name"
20
+ )
21
+
17
22
// ListWorkflows creates a tool to list workflows in a repository
18
23
func ListWorkflows (getClient GetClientFn ,t translations.TranslationHelperFunc ) (tool mcp.Tool ,handler server.ToolHandlerFunc ) {
19
24
return mcp .NewTool ("list_workflows" ,
@@ -23,11 +28,11 @@ func ListWorkflows(getClient GetClientFn, t translations.TranslationHelperFunc)
23
28
}),
24
29
mcp .WithString ("owner" ,
25
30
mcp .Required (),
26
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
31
+ mcp .Description (DescriptionRepositoryOwner ),
27
32
),
28
33
mcp .WithString ("repo" ,
29
34
mcp .Required (),
30
- mcp .Description ("Repository name" ),
35
+ mcp .Description (DescriptionRepositoryName ),
31
36
),
32
37
mcp .WithNumber ("per_page" ,
33
38
mcp .Description ("The number of results per page (max 100)" ),
@@ -91,11 +96,11 @@ func ListWorkflowRuns(getClient GetClientFn, t translations.TranslationHelperFun
91
96
}),
92
97
mcp .WithString ("owner" ,
93
98
mcp .Required (),
94
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
99
+ mcp .Description (DescriptionRepositoryOwner ),
95
100
),
96
101
mcp .WithString ("repo" ,
97
102
mcp .Required (),
98
- mcp .Description ("Repository name" ),
103
+ mcp .Description (DescriptionRepositoryName ),
99
104
),
100
105
mcp .WithString ("workflow_id" ,
101
106
mcp .Required (),
@@ -238,11 +243,11 @@ func RunWorkflow(getClient GetClientFn, t translations.TranslationHelperFunc) (t
238
243
}),
239
244
mcp .WithString ("owner" ,
240
245
mcp .Required (),
241
- mcp .Description ("Repository owner" ),
246
+ mcp .Description (DescriptionRepositoryOwner ),
242
247
),
243
248
mcp .WithString ("repo" ,
244
249
mcp .Required (),
245
- mcp .Description ("Repository name" ),
250
+ mcp .Description (DescriptionRepositoryName ),
246
251
),
247
252
mcp .WithNumber ("workflow_id" ,
248
253
mcp .Required (),
@@ -328,11 +333,11 @@ func RunWorkflowByFileName(getClient GetClientFn, t translations.TranslationHelp
328
333
}),
329
334
mcp .WithString ("owner" ,
330
335
mcp .Required (),
331
- mcp .Description ("Repository owner" ),
336
+ mcp .Description (DescriptionRepositoryOwner ),
332
337
),
333
338
mcp .WithString ("repo" ,
334
339
mcp .Required (),
335
- mcp .Description ("Repository name" ),
340
+ mcp .Description (DescriptionRepositoryName ),
336
341
),
337
342
mcp .WithString ("workflow_file" ,
338
343
mcp .Required (),
@@ -415,11 +420,11 @@ func GetWorkflowRun(getClient GetClientFn, t translations.TranslationHelperFunc)
415
420
}),
416
421
mcp .WithString ("owner" ,
417
422
mcp .Required (),
418
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
423
+ mcp .Description (DescriptionRepositoryOwner ),
419
424
),
420
425
mcp .WithString ("repo" ,
421
426
mcp .Required (),
422
- mcp .Description ("Repository name" ),
427
+ mcp .Description (DescriptionRepositoryName ),
423
428
),
424
429
mcp .WithNumber ("run_id" ,
425
430
mcp .Required (),
@@ -470,11 +475,11 @@ func GetWorkflowRunLogs(getClient GetClientFn, t translations.TranslationHelperF
470
475
}),
471
476
mcp .WithString ("owner" ,
472
477
mcp .Required (),
473
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
478
+ mcp .Description (DescriptionRepositoryOwner ),
474
479
),
475
480
mcp .WithString ("repo" ,
476
481
mcp .Required (),
477
- mcp .Description ("Repository name" ),
482
+ mcp .Description (DescriptionRepositoryName ),
478
483
),
479
484
mcp .WithNumber ("run_id" ,
480
485
mcp .Required (),
@@ -535,11 +540,11 @@ func ListWorkflowJobs(getClient GetClientFn, t translations.TranslationHelperFun
535
540
}),
536
541
mcp .WithString ("owner" ,
537
542
mcp .Required (),
538
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
543
+ mcp .Description (DescriptionRepositoryOwner ),
539
544
),
540
545
mcp .WithString ("repo" ,
541
546
mcp .Required (),
542
- mcp .Description ("Repository name" ),
547
+ mcp .Description (DescriptionRepositoryName ),
543
548
),
544
549
mcp .WithNumber ("run_id" ,
545
550
mcp .Required (),
@@ -631,11 +636,11 @@ func GetJobLogs(getClient GetClientFn, t translations.TranslationHelperFunc) (to
631
636
}),
632
637
mcp .WithString ("owner" ,
633
638
mcp .Required (),
634
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
639
+ mcp .Description (DescriptionRepositoryOwner ),
635
640
),
636
641
mcp .WithString ("repo" ,
637
642
mcp .Required (),
638
- mcp .Description ("Repository name" ),
643
+ mcp .Description (DescriptionRepositoryName ),
639
644
),
640
645
mcp .WithNumber ("job_id" ,
641
646
mcp .Description ("The unique identifier of the workflow job (required for single job logs)" ),
@@ -845,11 +850,11 @@ func RerunWorkflowRun(getClient GetClientFn, t translations.TranslationHelperFun
845
850
}),
846
851
mcp .WithString ("owner" ,
847
852
mcp .Required (),
848
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
853
+ mcp .Description (DescriptionRepositoryOwner ),
849
854
),
850
855
mcp .WithString ("repo" ,
851
856
mcp .Required (),
852
- mcp .Description ("Repository name" ),
857
+ mcp .Description (DescriptionRepositoryName ),
853
858
),
854
859
mcp .WithNumber ("run_id" ,
855
860
mcp .Required (),
@@ -907,11 +912,11 @@ func RerunFailedJobs(getClient GetClientFn, t translations.TranslationHelperFunc
907
912
}),
908
913
mcp .WithString ("owner" ,
909
914
mcp .Required (),
910
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
915
+ mcp .Description (DescriptionRepositoryOwner ),
911
916
),
912
917
mcp .WithString ("repo" ,
913
918
mcp .Required (),
914
- mcp .Description ("Repository name" ),
919
+ mcp .Description (DescriptionRepositoryName ),
915
920
),
916
921
mcp .WithNumber ("run_id" ,
917
922
mcp .Required (),
@@ -969,11 +974,11 @@ func CancelWorkflowRun(getClient GetClientFn, t translations.TranslationHelperFu
969
974
}),
970
975
mcp .WithString ("owner" ,
971
976
mcp .Required (),
972
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
977
+ mcp .Description (DescriptionRepositoryOwner ),
973
978
),
974
979
mcp .WithString ("repo" ,
975
980
mcp .Required (),
976
- mcp .Description ("Repository name" ),
981
+ mcp .Description (DescriptionRepositoryName ),
977
982
),
978
983
mcp .WithNumber ("run_id" ,
979
984
mcp .Required (),
@@ -1031,11 +1036,11 @@ func ListWorkflowRunArtifacts(getClient GetClientFn, t translations.TranslationH
1031
1036
}),
1032
1037
mcp .WithString ("owner" ,
1033
1038
mcp .Required (),
1034
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1039
+ mcp .Description (DescriptionRepositoryOwner ),
1035
1040
),
1036
1041
mcp .WithString ("repo" ,
1037
1042
mcp .Required (),
1038
- mcp .Description ("Repository name" ),
1043
+ mcp .Description (DescriptionRepositoryName ),
1039
1044
),
1040
1045
mcp .WithNumber ("run_id" ,
1041
1046
mcp .Required (),
@@ -1108,11 +1113,11 @@ func DownloadWorkflowRunArtifact(getClient GetClientFn, t translations.Translati
1108
1113
}),
1109
1114
mcp .WithString ("owner" ,
1110
1115
mcp .Required (),
1111
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1116
+ mcp .Description (DescriptionRepositoryOwner ),
1112
1117
),
1113
1118
mcp .WithString ("repo" ,
1114
1119
mcp .Required (),
1115
- mcp .Description ("Repository name" ),
1120
+ mcp .Description (DescriptionRepositoryName ),
1116
1121
),
1117
1122
mcp .WithNumber ("artifact_id" ,
1118
1123
mcp .Required (),
@@ -1173,11 +1178,11 @@ func DeleteWorkflowRunLogs(getClient GetClientFn, t translations.TranslationHelp
1173
1178
}),
1174
1179
mcp .WithString ("owner" ,
1175
1180
mcp .Required (),
1176
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1181
+ mcp .Description (DescriptionRepositoryOwner ),
1177
1182
),
1178
1183
mcp .WithString ("repo" ,
1179
1184
mcp .Required (),
1180
- mcp .Description ("Repository name" ),
1185
+ mcp .Description (DescriptionRepositoryName ),
1181
1186
),
1182
1187
mcp .WithNumber ("run_id" ,
1183
1188
mcp .Required (),
@@ -1235,11 +1240,11 @@ func GetWorkflowRunUsage(getClient GetClientFn, t translations.TranslationHelper
1235
1240
}),
1236
1241
mcp .WithString ("owner" ,
1237
1242
mcp .Required (),
1238
- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1243
+ mcp .Description (DescriptionRepositoryOwner ),
1239
1244
),
1240
1245
mcp .WithString ("repo" ,
1241
1246
mcp .Required (),
1242
- mcp .Description ("Repository name" ),
1247
+ mcp .Description (DescriptionRepositoryName ),
1243
1248
),
1244
1249
mcp .WithNumber ("run_id" ,
1245
1250
mcp .Required (),