Skip to main content
Glama

get_commit

Read-only

Retrieve details for a specific GitLab commit by project ID and commit SHA, optionally including commit stats or filtering the JSON result with JMESPath.

Instructions

Get details of a specific commit. To find resources, use the matching list or search tool.

Input Schema

NameRequiredDescriptionDefault
shaYesThe commit hash or name of a repository branch or tag
statsNoInclude commit stats
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv2.1.62
    • changedInput schema / required
      Previous value: -[
      -  "sha",
      -  "project_id"
      -]New value: +[
      +  "project_id",
      +  "sha"
      +]
  3. Addedv2.1.45
  4. Removedv2.1.43
  5. Addedv2.1.18
  6. Removedv2.1.14
  7. Addedv2.1.11
  8. Removedv2.1.10
  9. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / required
      Previous value: -[
      -  "sha"
      -]New value: +[
      +  "sha",
      +  "project_id"
      +]
  10. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds nothing beyond that: no mention of what 'details' includes, that stats are optional, that jmespath filters the payload, or any auth/rate-limit context. For a read tool this is thin but not contradictory.

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

Conciseness4/5

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

Two short sentences with the core purpose front-loaded and no filler. The second sentence carries mild value as a discovery hint, though it is near-boilerplate.

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?

A simple read-only tool with no output schema, so the description needn't explain return values. Still, 'details' is underspecified — the agent gets no sense of what fields come back or how stats/jmespath change the result, which would matter for constructing follow-up calls.

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 parameters are fully documented in the schema itself (sha as hash/branch/tag, stats toggle, jmespath filter). The description contributes no additional parameter meaning. Baseline 3 applies.

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?

States a specific verb and resource: 'Get details of a specific commit.' An agent can tell it retrieves a single commit. However, it does not distinguish itself from siblings like get_commit_diff or list_commits, so the agent must infer that this returns commit metadata rather than a diff.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The line 'To find resources, use the matching list or search tool' implies the SHA must be discovered via list_commits first, which is useful. But it is generic boilerplate, gives no explicit when-not-to-use guidance, and never mentions get_commit_diff as the alternative for diff content.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.