Skip to main content
Glama

get_commit

Retrieve detailed information about a specific GitLab commit, including its hash, project details, and optional statistics for tracking changes.

Instructions

Get details of a specific commit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject ID or complete URL-encoded path to project
shaYesThe commit hash or name of a repository branch or tag
statsNoInclude commit stats

Implementation Reference

  • Input schema for the get_commit tool, defining parameters project_id, sha, and optional stats.
    export const GetCommitSchema = z.object({ project_id: z.coerce.string().describe("Project ID or complete URL-encoded path to project"), sha: z.string().describe("The commit hash or name of a repository branch or tag"), stats: z.boolean().optional().describe("Include commit stats"), });
  • Output schema for commit data returned by the get_commit tool.
    export const GitLabCommitSchema = z.object({ id: z.string(), // Changed from sha to match GitLab API short_id: z.string(), // Added to match GitLab API title: z.string(), // Changed from message to match GitLab API author_name: z.string(), author_email: z.string(), authored_date: z.string(), committer_name: z.string(), committer_email: z.string(), committed_date: z.string(), created_at: z.string().optional(), // Add created_at field message: z.string().optional(), // Add full message field web_url: z.string(), // Changed from html_url to match GitLab API parent_ids: z.array(z.string()), // Changed from parents to match GitLab API stats: z .object({ additions: z.number().optional().nullable(), deletions: z.number().optional().nullable(), total: z.number().optional().nullable(), }) .optional(), // Only present when with_stats=true trailers: z.record(z.string()).optional().default({}), // Git trailers, may be empty object extended_trailers: z.record(z.array(z.string())).optional().default({}), // Extended trailers, may be empty object });

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/zereight/gitlab-mcp'

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