Skip to main content
Glama
onemarc

GitHub Actions MCP Server

by onemarc

list_workflows

Retrieve and manage workflows in a GitHub repository by specifying owner, repo, pagination, and results per page. Simplify workflow monitoring and interaction.

Instructions

List workflows in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
pageNoPage number for pagination
perPageNoResults per page (max 100)
repoYesRepository name

Implementation Reference

  • The handler function that implements the list_workflows tool logic, fetching workflows from GitHub using Octokit.
    const handleListWorkflows: ToolHandler = async (args, octokit: Octokit) => {
      const { owner, repo, page, perPage } = args;
      
      try {
        const response = await octokit.rest.actions.listRepoWorkflows({
          owner,
          repo,
          page,
          per_page: perPage
        });
    
        return {
          total_count: response.data.total_count,
          workflows: response.data.workflows.map(workflow => ({
            id: workflow.id,
            name: workflow.name,
            path: workflow.path,
            state: workflow.state,
            created_at: workflow.created_at,
            updated_at: workflow.updated_at,
            url: workflow.url,
            html_url: workflow.html_url,
            badge_url: workflow.badge_url
          }))
        };
      } catch (error: any) {
        throw new WorkflowError(`Failed to list workflows: ${error.message}`, error.response?.data);
      }
    };
    
    export default handleListWorkflows;
  • The schema definition for the list_workflows tool, including input schema and description.
    {
      name: "list_workflows",
      description: "List workflows in a GitHub repository",
      inputSchema: {
        type: "object",
        properties: {
          owner: { type: "string", description: "Repository owner" },
          repo: { type: "string", description: "Repository name" },
          page: { type: "number", description: "Page number for pagination" },
          perPage: { type: "number", description: "Results per page (max 100)" }
        },
        required: ["owner", "repo"]
      }
    },
  • Registration of the list_workflows 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,
    };
  • src/tools/index.ts:4-4 (registration)
    Import of the list_workflows handler.
    import handleListWorkflows from './list-workflows.js';
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic action. It doesn't mention that this is a read-only operation (implied by 'list'), doesn't describe pagination behavior beyond what's in the schema, and doesn't explain what 'workflows' means in GitHub context (e.g., workflow files vs. workflow runs).

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

Conciseness5/5

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

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a straightforward list operation and front-loads the essential information.

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

Completeness3/5

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

For a list operation with good schema coverage but no annotations or output schema, the description is minimally adequate. It identifies the resource and action but lacks important context about what 'workflows' includes, how results are structured, or how this differs from sibling tools, leaving gaps for an agent to understand the full scope.

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?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('workflows in a GitHub repository'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_workflow_runs' or 'get_workflow', which could cause confusion about what specific workflows are being listed.

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 'list_workflow_runs' or 'get_workflow'. There's no mention of prerequisites, context, or exclusions that would help an agent choose between these similar-sounding workflow-related tools.

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