Skip to main content
Glama
ko1ynnky

GitHub Actions MCP Server

by ko1ynnky

get_workflow_usage

Retrieve usage statistics for a specific GitHub Actions workflow by providing the repository owner, repository name, and workflow ID or filename.

Instructions

Get usage statistics of a workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
workflowIdYesThe ID of the workflow or filename

Implementation Reference

  • The main handler function that implements the get_workflow_usage tool logic. It validates inputs, constructs the GitHub API URL for workflow timing statistics, fetches the data, and parses it using WorkflowUsageSchema.
    export async function getWorkflowUsage( owner: string, repo: string, workflowId: string | number ) { owner = validateOwnerName(owner); repo = validateRepositoryName(repo); const url = `https://api.github.com/repos/${owner}/${repo}/actions/workflows/${workflowId}/timing`; const response = await githubRequest(url); return WorkflowUsageSchema.parse(response); }
  • Input schema definition for the get_workflow_usage tool, which reuses the GetWorkflowSchema defining required parameters: owner, repo, and workflowId.
    export const GetWorkflowUsageSchema = GetWorkflowSchema;
  • src/index.ts:168-175 (registration)
    Registration of the get_workflow_usage tool in the MCP server using server.tool(), providing the input schema and the handler that calls the actions.getWorkflowUsage function.
    server.tool( "get_workflow_usage", actions.GetWorkflowUsageSchema.shape, async (request: any) => { const result = await actions.getWorkflowUsage(request.owner, request.repo, request.workflowId); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } );

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/ko1ynnky/github-actions-mcp-server'

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