get_workflow_run
Retrieve details of a specific GitHub Actions workflow run by providing repository owner, repository name, and run ID to monitor execution status and results.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| runId | Yes | The ID of the workflow run |
Implementation Reference
- src/operations/actions.ts:181-192 (handler)The core handler function that fetches the details of a specific GitHub Actions workflow run by making an API request to GitHub and parsing the response.export async function getWorkflowRun( owner: string, repo: string, runId: number ) { owner = validateOwnerName(owner); repo = validateRepositoryName(repo); const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${runId}`; const response = await githubRequest(url); return WorkflowRunSchema.parse(response); }
- src/operations/actions.ts:51-55 (schema)Zod schema defining the input parameters for the get_workflow_run tool: owner, repo, and runId.export const GetWorkflowRunSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), runId: z.number().describe("The ID of the workflow run"), });
- src/index.ts:188-194 (registration)Registration of the 'get_workflow_run' tool in the MCP server using server.tool, providing the schema and handler wrapper."get_workflow_run", actions.GetWorkflowRunSchema.shape, async (request: any) => { const result = await actions.getWorkflowRun(request.owner, request.repo, request.runId); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } );