Skip to main content
Glama

get_combined_status

Retrieve the combined status of a commit in a GitHub repository by specifying the owner, repository name, and reference (SHA, branch, or tag).

Instructions

Get the combined status for a commit

Input Schema

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

Implementation Reference

  • The main handler function that executes the tool logic: fetches the combined commit status from the GitHub API endpoint /repos/{owner}/{repo}/commits/{ref}/status and validates the response using CombinedStatusResponseSchema.
    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 schema definitions: GetCombinedStatusSchema (public input) and _GetCombinedStatusSchema (internal with github_pat).
    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 for the combined status response from GitHub API.
    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 ListTools response: defines name, description, and input schema.
    { name: "get_combined_status", description: "Get the combined status for a commit", inputSchema: zodToJsonSchema(statuses.GetCombinedStatusSchema), },
  • src/index.ts:638-645 (registration)
    Dispatch logic in the CallToolRequest handler: parses arguments using _GetCombinedStatusSchema and invokes the getCombinedStatus function.
    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