Skip to main content
Glama

get_commit_statuses

Retrieve GitHub commit statuses to check build results, test outcomes, and deployment states for specific repository references.

Instructions

Get statuses 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 statuses for

Implementation Reference

  • The core handler function that fetches commit statuses from the GitHub API endpoint `/repos/{owner}/{repo}/commits/{ref}/statuses` and parses the response using Zod.
    export async function getCommitStatuses(
      github_pat: string,
      owner: string,
      repo: string,
      ref: string
    ): Promise<z.infer<typeof CommitStatusSchema>[]> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/repos/${owner}/${repo}/commits/${ref}/statuses`
      );
      return z.array(CommitStatusSchema).parse(response);
    }
  • Zod input schemas: GetCommitStatusesSchema (public) and _GetCommitStatusesSchema (internal with github_pat) used for validation.
    export const GetCommitStatusesSchema = 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 statuses for")
    });
    
    export const _GetCommitStatusesSchema = GetCommitStatusesSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:217-220 (registration)
    Tool registration in the listTools handler, defining name, description, and inputSchema.
      name: "get_commit_statuses",
      description: "Get statuses for a commit",
      inputSchema: zodToJsonSchema(statuses.GetCommitStatusesSchema),
    },
  • src/index.ts:629-636 (registration)
    Dispatch handler in the CallToolRequest switch statement that validates arguments and invokes the getCommitStatuses function.
    case "get_commit_statuses": {
      const args = statuses._GetCommitStatusesSchema.parse(params.arguments);
      const { github_pat, owner, repo, ref } = args;
      const result = await statuses.getCommitStatuses(github_pat, owner, repo, ref);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Get statuses' which implies a read-only operation, but doesn't mention authentication requirements, rate limits, pagination, error handling, or what 'statuses' specifically entail (e.g., CI checks, deployment states). This leaves significant gaps for agent understanding.

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 with no wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core purpose immediately.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'statuses' returns (e.g., array of objects with state, context, URL), how results are formatted, or any behavioral constraints. For a tool with three parameters and no structured output documentation, this leaves too much unspecified.

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%, with all three parameters (owner, repo, ref) well-documented in the schema. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline for high coverage without providing extra value.

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 'Get statuses for a commit' clearly states the action (get) and resource (statuses for a commit), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_combined_status' which might retrieve aggregated status information, leaving some ambiguity about scope.

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. With siblings like 'get_combined_status' and 'list_commits' available, there's no indication of whether this tool is for detailed per-commit statuses, batch operations, or specific use cases.

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

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