Skip to main content
Glama

get_combined_status

Retrieve the combined status of a GitHub commit to check CI/CD pipeline results and deployment readiness for a specific repository reference.

Instructions

Get the combined status for a commit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
refYesThe ref (SHA, branch name, or tag name) to get the combined status for

Implementation Reference

  • Core handler function that executes the tool logic: fetches combined commit status from GitHub API and parses with Zod schema.
    export async function getCombinedStatus(
      github_pat: string,
      owner: string,
      repo: string,
      ref: string
    ): Promise<z.infer<typeof CombinedStatusResponseSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/repos/${owner}/${repo}/commits/${ref}/status`
      );
      
      return CombinedStatusResponseSchema.parse(response);
    }
  • Input schemas: public schema for tool registration and internal schema (with PAT) for parsing tool call arguments.
    export const GetCombinedStatusSchema = z.object({
      owner: z.string().describe("Repository owner (username or organization)"),
      repo: z.string().describe("Repository name"),
      ref: z.string().describe("The ref (SHA, branch name, or tag name) to get the combined status for")
    });
    
    export const _GetCombinedStatusSchema = GetCombinedStatusSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • Output schema used to validate and type the GitHub combined status API response.
    export const CombinedStatusResponseSchema = z.object({
      state: z.string(),
      statuses: z.array(CommitStatusSchema),
      sha: z.string(),
      total_count: z.number(),
      repository: z.object({
        id: z.number(),
        name: z.string(),
        full_name: z.string(),
        owner: z.any(),
      }),
    });
  • src/index.ts:221-225 (registration)
    Tool registration in the MCP server's ListTools response, defining name, description, and input schema.
    {
      name: "get_combined_status",
      description: "Get the combined status for a commit",
      inputSchema: zodToJsonSchema(statuses.GetCombinedStatusSchema),
    },
  • MCP CallTool handler case: parses arguments and delegates to the core getCombinedStatus implementation.
    case "get_combined_status": {
      const args = statuses._GetCombinedStatusSchema.parse(params.arguments);
      const { github_pat, owner, repo, ref } = args;
      const result = await statuses.getCombinedStatus(github_pat, owner, repo, ref);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }

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/MissionSquad/mcp-github'

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