Skip to main content
Glama
onemarc

GitHub Actions MCP Server

by onemarc

get_workflow_run_jobs

Retrieve jobs for a specific GitHub Actions workflow run by specifying owner, repo, run ID, and filters to manage and monitor workflow execution details.

Instructions

Get jobs for a specific workflow run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFilter jobs by completion status
ownerYesRepository owner
pageNoPage number for pagination
perPageNoResults per page (max 100)
repoYesRepository name
runIdYesThe ID of the workflow run

Implementation Reference

  • The main ToolHandler function that implements the get_workflow_run_jobs tool logic, fetching jobs for a workflow run via GitHub API using Octokit.
    const handleGetWorkflowRunJobs: ToolHandler = async (args, octokit: Octokit) => { const { owner, repo, runId, filter, page, perPage } = args; try { const response = await octokit.rest.actions.listJobsForWorkflowRun({ owner, repo, run_id: runId, filter, page, per_page: perPage }); return { total_count: response.data.total_count, jobs: response.data.jobs.map(job => ({ id: job.id, name: job.name, status: job.status, conclusion: job.conclusion, created_at: job.created_at, started_at: job.started_at, completed_at: job.completed_at, url: job.url, html_url: job.html_url, runner_id: job.runner_id, runner_name: job.runner_name, runner_group_id: job.runner_group_id, runner_group_name: job.runner_group_name, steps: job.steps?.map(step => ({ name: step.name, status: step.status, conclusion: step.conclusion, number: step.number, started_at: step.started_at, completed_at: step.completed_at })) })) }; } catch (error: any) { throw new WorkflowError(`Failed to get workflow run jobs: ${error.message}`, error.response?.data); } };
  • Input schema definition for the get_workflow_run_jobs tool, defining parameters and validation rules.
    { name: "get_workflow_run_jobs", description: "Get jobs for 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" }, filter: { type: "string", enum: ["latest", "all"], description: "Filter jobs by completion status" }, page: { type: "number", description: "Page number for pagination" }, perPage: { type: "number", description: "Results per page (max 100)" } }, required: ["owner", "repo", "runId"] } },
  • Registration of the tool handler in the toolHandlers record, mapping 'get_workflow_run_jobs' to handleGetWorkflowRunJobs. Includes the import from line 9.
    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, };

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/onemarc/github-actions-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server