@@ -14,6 +14,11 @@ import (
1414 "github.com/mark3labs/mcp-go/server"
1515)
1616
17+ const (
18+ DescriptionRepositoryOwner = "Repository owner"
19+ DescriptionRepositoryName = "Repository name"
20+ )
21+
1722// ListWorkflows creates a tool to list workflows in a repository
1823func ListWorkflows (getClient GetClientFn , t translations.TranslationHelperFunc ) (tool mcp.Tool , handler server.ToolHandlerFunc ) {
1924 return mcp .NewTool ("list_workflows" ,
@@ -23,11 +28,11 @@ func ListWorkflows(getClient GetClientFn, t translations.TranslationHelperFunc)
2328 }),
2429 mcp .WithString ("owner" ,
2530 mcp .Required (),
26- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
31+ mcp .Description (DescriptionRepositoryOwner ),
2732 ),
2833 mcp .WithString ("repo" ,
2934 mcp .Required (),
30- mcp .Description ("Repository name" ),
35+ mcp .Description (DescriptionRepositoryName ),
3136 ),
3237 mcp .WithNumber ("per_page" ,
3338 mcp .Description ("The number of results per page (max 100)" ),
@@ -91,11 +96,11 @@ func ListWorkflowRuns(getClient GetClientFn, t translations.TranslationHelperFun
9196 }),
9297 mcp .WithString ("owner" ,
9398 mcp .Required (),
94- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
99+ mcp .Description (DescriptionRepositoryOwner ),
95100 ),
96101 mcp .WithString ("repo" ,
97102 mcp .Required (),
98- mcp .Description ("Repository name" ),
103+ mcp .Description (DescriptionRepositoryName ),
99104 ),
100105 mcp .WithString ("workflow_id" ,
101106 mcp .Required (),
@@ -238,11 +243,11 @@ func RunWorkflow(getClient GetClientFn, t translations.TranslationHelperFunc) (t
238243 }),
239244 mcp .WithString ("owner" ,
240245 mcp .Required (),
241- mcp .Description ("Repository owner" ),
246+ mcp .Description (DescriptionRepositoryOwner ),
242247 ),
243248 mcp .WithString ("repo" ,
244249 mcp .Required (),
245- mcp .Description ("Repository name" ),
250+ mcp .Description (DescriptionRepositoryName ),
246251 ),
247252 mcp .WithNumber ("workflow_id" ,
248253 mcp .Required (),
@@ -328,11 +333,11 @@ func RunWorkflowByFileName(getClient GetClientFn, t translations.TranslationHelp
328333 }),
329334 mcp .WithString ("owner" ,
330335 mcp .Required (),
331- mcp .Description ("Repository owner" ),
336+ mcp .Description (DescriptionRepositoryOwner ),
332337 ),
333338 mcp .WithString ("repo" ,
334339 mcp .Required (),
335- mcp .Description ("Repository name" ),
340+ mcp .Description (DescriptionRepositoryName ),
336341 ),
337342 mcp .WithString ("workflow_file" ,
338343 mcp .Required (),
@@ -415,11 +420,11 @@ func GetWorkflowRun(getClient GetClientFn, t translations.TranslationHelperFunc)
415420 }),
416421 mcp .WithString ("owner" ,
417422 mcp .Required (),
418- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
423+ mcp .Description (DescriptionRepositoryOwner ),
419424 ),
420425 mcp .WithString ("repo" ,
421426 mcp .Required (),
422- mcp .Description ("Repository name" ),
427+ mcp .Description (DescriptionRepositoryName ),
423428 ),
424429 mcp .WithNumber ("run_id" ,
425430 mcp .Required (),
@@ -470,11 +475,11 @@ func GetWorkflowRunLogs(getClient GetClientFn, t translations.TranslationHelperF
470475 }),
471476 mcp .WithString ("owner" ,
472477 mcp .Required (),
473- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
478+ mcp .Description (DescriptionRepositoryOwner ),
474479 ),
475480 mcp .WithString ("repo" ,
476481 mcp .Required (),
477- mcp .Description ("Repository name" ),
482+ mcp .Description (DescriptionRepositoryName ),
478483 ),
479484 mcp .WithNumber ("run_id" ,
480485 mcp .Required (),
@@ -535,11 +540,11 @@ func ListWorkflowJobs(getClient GetClientFn, t translations.TranslationHelperFun
535540 }),
536541 mcp .WithString ("owner" ,
537542 mcp .Required (),
538- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
543+ mcp .Description (DescriptionRepositoryOwner ),
539544 ),
540545 mcp .WithString ("repo" ,
541546 mcp .Required (),
542- mcp .Description ("Repository name" ),
547+ mcp .Description (DescriptionRepositoryName ),
543548 ),
544549 mcp .WithNumber ("run_id" ,
545550 mcp .Required (),
@@ -631,11 +636,11 @@ func GetJobLogs(getClient GetClientFn, t translations.TranslationHelperFunc) (to
631636 }),
632637 mcp .WithString ("owner" ,
633638 mcp .Required (),
634- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
639+ mcp .Description (DescriptionRepositoryOwner ),
635640 ),
636641 mcp .WithString ("repo" ,
637642 mcp .Required (),
638- mcp .Description ("Repository name" ),
643+ mcp .Description (DescriptionRepositoryName ),
639644 ),
640645 mcp .WithNumber ("job_id" ,
641646 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
845850 }),
846851 mcp .WithString ("owner" ,
847852 mcp .Required (),
848- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
853+ mcp .Description (DescriptionRepositoryOwner ),
849854 ),
850855 mcp .WithString ("repo" ,
851856 mcp .Required (),
852- mcp .Description ("Repository name" ),
857+ mcp .Description (DescriptionRepositoryName ),
853858 ),
854859 mcp .WithNumber ("run_id" ,
855860 mcp .Required (),
@@ -907,11 +912,11 @@ func RerunFailedJobs(getClient GetClientFn, t translations.TranslationHelperFunc
907912 }),
908913 mcp .WithString ("owner" ,
909914 mcp .Required (),
910- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
915+ mcp .Description (DescriptionRepositoryOwner ),
911916 ),
912917 mcp .WithString ("repo" ,
913918 mcp .Required (),
914- mcp .Description ("Repository name" ),
919+ mcp .Description (DescriptionRepositoryName ),
915920 ),
916921 mcp .WithNumber ("run_id" ,
917922 mcp .Required (),
@@ -969,11 +974,11 @@ func CancelWorkflowRun(getClient GetClientFn, t translations.TranslationHelperFu
969974 }),
970975 mcp .WithString ("owner" ,
971976 mcp .Required (),
972- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
977+ mcp .Description (DescriptionRepositoryOwner ),
973978 ),
974979 mcp .WithString ("repo" ,
975980 mcp .Required (),
976- mcp .Description ("Repository name" ),
981+ mcp .Description (DescriptionRepositoryName ),
977982 ),
978983 mcp .WithNumber ("run_id" ,
979984 mcp .Required (),
@@ -1031,11 +1036,11 @@ func ListWorkflowRunArtifacts(getClient GetClientFn, t translations.TranslationH
10311036 }),
10321037 mcp .WithString ("owner" ,
10331038 mcp .Required (),
1034- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1039+ mcp .Description (DescriptionRepositoryOwner ),
10351040 ),
10361041 mcp .WithString ("repo" ,
10371042 mcp .Required (),
1038- mcp .Description ("Repository name" ),
1043+ mcp .Description (DescriptionRepositoryName ),
10391044 ),
10401045 mcp .WithNumber ("run_id" ,
10411046 mcp .Required (),
@@ -1108,11 +1113,11 @@ func DownloadWorkflowRunArtifact(getClient GetClientFn, t translations.Translati
11081113 }),
11091114 mcp .WithString ("owner" ,
11101115 mcp .Required (),
1111- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1116+ mcp .Description (DescriptionRepositoryOwner ),
11121117 ),
11131118 mcp .WithString ("repo" ,
11141119 mcp .Required (),
1115- mcp .Description ("Repository name" ),
1120+ mcp .Description (DescriptionRepositoryName ),
11161121 ),
11171122 mcp .WithNumber ("artifact_id" ,
11181123 mcp .Required (),
@@ -1173,11 +1178,11 @@ func DeleteWorkflowRunLogs(getClient GetClientFn, t translations.TranslationHelp
11731178 }),
11741179 mcp .WithString ("owner" ,
11751180 mcp .Required (),
1176- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1181+ mcp .Description (DescriptionRepositoryOwner ),
11771182 ),
11781183 mcp .WithString ("repo" ,
11791184 mcp .Required (),
1180- mcp .Description ("Repository name" ),
1185+ mcp .Description (DescriptionRepositoryName ),
11811186 ),
11821187 mcp .WithNumber ("run_id" ,
11831188 mcp .Required (),
@@ -1235,11 +1240,11 @@ func GetWorkflowRunUsage(getClient GetClientFn, t translations.TranslationHelper
12351240 }),
12361241 mcp .WithString ("owner" ,
12371242 mcp .Required (),
1238- mcp .Description ("The account owner of the repository. The name is not case sensitive." ),
1243+ mcp .Description (DescriptionRepositoryOwner ),
12391244 ),
12401245 mcp .WithString ("repo" ,
12411246 mcp .Required (),
1242- mcp .Description ("Repository name" ),
1247+ mcp .Description (DescriptionRepositoryName ),
12431248 ),
12441249 mcp .WithNumber ("run_id" ,
12451250 mcp .Required (),
0 commit comments