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,
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but doesn't describe whether this is a read-only operation, if it requires authentication, how pagination works (beyond what's in the schema), or what the output format looks like. For a tool with 6 parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple tool, though it could be more front-loaded with key details if it were longer. There's no waste, but it's borderline under-specified rather than concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, error conditions, or how this tool fits into the broader workflow system. For a tool that likely returns job data, more context is needed to guide effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds no additional meaning beyond what the schema provides, such as explaining the relationship between parameters or usage examples. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get jobs for a specific workflow run' clearly states the verb ('Get') and resource ('jobs for a specific workflow run'), but it's somewhat vague about what 'jobs' entails and doesn't distinguish this tool from potential sibling tools like 'get_workflow_run' or 'list_workflow_runs'. It's adequate but lacks specificity about the scope of 'jobs'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_workflow_run' or 'list_workflow_runs'. It doesn't mention prerequisites, such as needing a specific workflow run ID, or clarify its role in the workflow management context. Usage is implied by the name but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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