Skip to main content
Glama
onemarc

GitHub Actions MCP Server

by onemarc

get_workflow

Retrieve detailed information about a specific GitHub Actions workflow by providing the repository owner, repository name, and workflow ID or filename.

Instructions

Get details of a specific workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
workflowIdYesThe ID of the workflow or filename

Implementation Reference

  • The handler function for the 'get_workflow' tool, which retrieves workflow details using the Octokit API.
    const handleGetWorkflow: ToolHandler = async (args, octokit: Octokit) => {
      const { owner, repo, workflowId } = args;
      
      try {
        const response = await octokit.rest.actions.getWorkflow({
          owner,
          repo,
          workflow_id: workflowId
        });
    
        return response.data;
      } catch (error: any) {
        throw new WorkflowError(`Failed to get workflow: ${error.message}`, error.response?.data);
      }
    };
    
    export default handleGetWorkflow;
  • The input schema and definition for the 'get_workflow' tool.
    {
      name: "get_workflow",
      description: "Get details of a specific workflow",
      inputSchema: {
        type: "object",
        properties: {
          owner: { type: "string", description: "Repository owner" },
          repo: { type: "string", description: "Repository name" },
          workflowId: { 
            oneOf: [
              { type: "string" },
              { type: "number" }
            ],
            description: "The ID of the workflow or filename"
          }
        },
        required: ["owner", "repo", "workflowId"]
      }
    },
  • Registration of the 'get_workflow' handler in the toolHandlers map.
    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,
    };
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