get_workflow_run
Retrieve detailed information about a specific GitHub Actions workflow run by providing the repository owner, repository name, and run ID for effective monitoring and analysis.
Instructions
Get details of a specific workflow run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner | |
| repo | Yes | Repository name | |
| runId | Yes | The ID of the workflow run |
Implementation Reference
- src/tools/get-workflow-run.ts:5-21 (handler)The main handler function for the 'get_workflow_run' tool. It extracts owner, repo, and runId from args, calls the GitHub Octokit API to get the workflow run details, returns the data, or throws a WorkflowError on failure.const handleGetWorkflowRun: ToolHandler = async (args, octokit: Octokit) => { const { owner, repo, runId } = args; try { const response = await octokit.rest.actions.getWorkflowRun({ owner, repo, run_id: runId }); return response.data; } catch (error: any) { throw new WorkflowError(`Failed to get workflow run: ${error.message}`, error.response?.data); } }; export default handleGetWorkflowRun;
- The tool definition including name, description, and input schema for validating arguments: owner, repo, runId.{ name: "get_workflow_run", description: "Get details of a specific workflow run", inputSchema: { type: "object", properties: { owner: { type: "string", description: "Repository owner" }, repo: { type: "string", description: "Repository name" }, runId: { type: "number", description: "The ID of the workflow run" } }, required: ["owner", "repo", "runId"] } },
- src/tools/index.ts:14-25 (registration)Registration of the 'get_workflow_run' handler in the toolHandlers object, mapped to handleGetWorkflowRun imported from './get-workflow-run.js'.export const toolHandlers: Record<string, ToolHandler> = { create_workflow: handleCreateWorkflow, list_workflows: handleListWorkflows, get_workflow: handleGetWorkflow, get_workflow_usage: handleGetWorkflowUsage, list_workflow_runs: handleListWorkflowRuns, get_workflow_run: handleGetWorkflowRun, get_workflow_run_jobs: handleGetWorkflowRunJobs, trigger_workflow: handleTriggerWorkflow, cancel_workflow_run: handleCancelWorkflowRun, rerun_workflow: handleRerunWorkflow, };