Skip to content

Commit 348b2bd

Browse files
committed
update get_job_log to get_workflow_job_logs
1 parent 72fb1d5 commit 348b2bd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/github/actions.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var actionsResourceTypes = map[actionsActionType]string{
5252
actionsActionTypeGetWorkflowRun: "get_workflow_run",
5353
actionsActionTypeGetWorkflowJob: "get_workflow_job",
5454
actionsActionTypeGetWorkflowRunLogs: "get_workflow_run_logs",
55-
actionsActionTypeGetWorkflowJobLogs: "get_job_logs",
55+
actionsActionTypeGetWorkflowJobLogs: "get_workflow_job_logs",
5656
actionsActionTypeGetWorkflowRunUsage: "get_workflow_run_usage",
5757
actionsActionTypeDownloadWorkflowArtifact: "download_workflow_run_artifact",
5858
actionsActionTypeRunWorkflow: "run_workflow",
@@ -286,20 +286,20 @@ Use this tool to get details about individual workflows, workflow runs, jobs, an
286286
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' action.
287287
- Provide a workflow run ID for 'get_workflow_run', 'download_workflow_run_artifact', 'get_workflow_run_usage', and 'get_workflow_run_logs' actions.
288288
- Provide a job ID for the 'get_workflow_job' action.
289-
- Provide a workflow run ID for 'get_job_logs' action when using failed_only parameter.
289+
- Provide a workflow run ID for 'get_workflow_job_logs' action when using failed_only parameter.
290290
`),
291291
),
292292
mcp.WithNumber("job_id",
293-
mcp.Description("The unique identifier of the workflow job (required for single job logs when action is 'get_job_logs')"),
293+
mcp.Description("The unique identifier of the workflow job (required for single job logs when action is 'get_workflow_job_logs')"),
294294
),
295295
mcp.WithBoolean("failed_only",
296-
mcp.Description("When true, gets logs for all failed jobs in the workflow run specified by resource_id (only for 'get_job_logs' action)"),
296+
mcp.Description("When true, gets logs for all failed jobs in the workflow run specified by resource_id (only for 'get_workflow_job_logs' action)"),
297297
),
298298
mcp.WithBoolean("return_content",
299-
mcp.Description("Returns actual log content instead of URLs (only for 'get_job_logs' action)"),
299+
mcp.Description("Returns actual log content instead of URLs (only for 'get_workflow_job_logs' action)"),
300300
),
301301
mcp.WithNumber("tail_lines",
302-
mcp.Description("Number of lines to return from the end of the log (only for 'get_job_logs' action)"),
302+
mcp.Description("Number of lines to return from the end of the log (only for 'get_workflow_job_logs' action)"),
303303
mcp.DefaultNumber(500),
304304
),
305305
),
@@ -335,7 +335,7 @@ Use this tool to get details about individual workflows, workflow runs, jobs, an
335335
}
336336
}
337337

338-
// Get optional parameters for get_job_logs
338+
// Get optional parameters for get_workflow_job_logs
339339
jobID, err := OptionalIntParam(request, "job_id")
340340
if err != nil {
341341
return mcp.NewToolResultError(err.Error()), nil
@@ -605,7 +605,7 @@ func listWorkflowJobs(ctx context.Context, client *github.Client, request mcp.Ca
605605
// Add optimization tip for failed job debugging
606606
response := map[string]any{
607607
"jobs": workflowJobs,
608-
"optimization_tip": "For debugging failed jobs, consider using get_job_logs with failed_only=true and run_id=" + fmt.Sprintf("%d", resourceID) + " to get logs directly without needing to list jobs first",
608+
"optimization_tip": "For debugging failed jobs, consider using get_workflow_job_logs with failed_only=true and run_id=" + fmt.Sprintf("%d", resourceID) + " to get logs directly without needing to list jobs first",
609609
}
610610

611611
defer func() { _ = resp.Body.Close() }()
@@ -797,8 +797,8 @@ func getWorkflowRunLogs(ctx context.Context, client *github.Client, _ mcp.CallTo
797797
"logs_url": url.String(),
798798
"message": "Workflow run logs are available for download",
799799
"note": "The logs_url provides a download link for the complete workflow run logs as a ZIP archive. You can download this archive to extract and examine individual job logs.",
800-
"warning": "This downloads ALL logs as a ZIP file which can be large and expensive. For debugging failed jobs, consider using get_job_logs with failed_only=true and run_id instead.",
801-
"optimization_tip": "Use: get_job_logs with parameters {run_id: " + fmt.Sprintf("%d", runID) + ", failed_only: true} for more efficient failed job debugging",
800+
"warning": "This downloads ALL logs as a ZIP file which can be large and expensive. For debugging failed jobs, consider using get_workflow_job_logs with failed_only=true and run_id instead.",
801+
"optimization_tip": "Use: get_workflow_job_logs with parameters {run_id: " + fmt.Sprintf("%d", runID) + ", failed_only: true} for more efficient failed job debugging",
802802
}
803803

804804
r, err := json.Marshal(result)

0 commit comments

Comments
 (0)