@@ -13,6 +13,7 @@ import (
1313 "testing"
1414
1515 "github.com/github/github-mcp-server/internal/profiler"
16+ "github.com/github/github-mcp-server/internal/toolsnaps"
1617 buffer "github.com/github/github-mcp-server/pkg/buffer"
1718 "github.com/github/github-mcp-server/pkg/translations"
1819 "github.com/google/go-github/v79/github"
@@ -26,6 +27,7 @@ func Test_ListWorkflows(t *testing.T) {
2627 // Verify tool definition once
2728 mockClient := github .NewClient (nil )
2829 tool , _ := ListWorkflows (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
30+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
2931
3032 assert .Equal (t , "list_workflows" , tool .Name )
3133 assert .NotEmpty (t , tool .Description )
@@ -138,6 +140,7 @@ func Test_RunWorkflow(t *testing.T) {
138140 // Verify tool definition once
139141 mockClient := github .NewClient (nil )
140142 tool , _ := RunWorkflow (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
143+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
141144
142145 assert .Equal (t , "run_workflow" , tool .Name )
143146 assert .NotEmpty (t , tool .Description )
@@ -314,6 +317,7 @@ func Test_CancelWorkflowRun(t *testing.T) {
314317 // Verify tool definition once
315318 mockClient := github .NewClient (nil )
316319 tool , _ := CancelWorkflowRun (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
320+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
317321
318322 assert .Equal (t , "cancel_workflow_run" , tool .Name )
319323 assert .NotEmpty (t , tool .Description )
@@ -419,6 +423,7 @@ func Test_ListWorkflowRunArtifacts(t *testing.T) {
419423 // Verify tool definition once
420424 mockClient := github .NewClient (nil )
421425 tool , _ := ListWorkflowRunArtifacts (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
426+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
422427
423428 assert .Equal (t , "list_workflow_run_artifacts" , tool .Name )
424429 assert .NotEmpty (t , tool .Description )
@@ -547,6 +552,7 @@ func Test_DownloadWorkflowRunArtifact(t *testing.T) {
547552 // Verify tool definition once
548553 mockClient := github .NewClient (nil )
549554 tool , _ := DownloadWorkflowRunArtifact (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
555+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
550556
551557 assert .Equal (t , "download_workflow_run_artifact" , tool .Name )
552558 assert .NotEmpty (t , tool .Description )
@@ -635,6 +641,7 @@ func Test_DeleteWorkflowRunLogs(t *testing.T) {
635641 // Verify tool definition once
636642 mockClient := github .NewClient (nil )
637643 tool , _ := DeleteWorkflowRunLogs (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
644+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
638645
639646 assert .Equal (t , "delete_workflow_run_logs" , tool .Name )
640647 assert .NotEmpty (t , tool .Description )
@@ -716,6 +723,7 @@ func Test_GetWorkflowRunUsage(t *testing.T) {
716723 // Verify tool definition once
717724 mockClient := github .NewClient (nil )
718725 tool , _ := GetWorkflowRunUsage (stubGetClientFn (mockClient ), translations .NullTranslationHelper )
726+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
719727
720728 assert .Equal (t , "get_workflow_run_usage" , tool .Name )
721729 assert .NotEmpty (t , tool .Description )
@@ -817,6 +825,7 @@ func Test_GetJobLogs(t *testing.T) {
817825 // Verify tool definition once
818826 mockClient := github .NewClient (nil )
819827 tool , _ := GetJobLogs (stubGetClientFn (mockClient ), translations .NullTranslationHelper , 5000 )
828+ require .NoError (t , toolsnaps .Test (tool .Name , tool ))
820829
821830 assert .Equal (t , "get_job_logs" , tool .Name )
822831 assert .NotEmpty (t , tool .Description )
0 commit comments