Skip to main content
Glama

Get Commit

gitlab_get_commit
Read-onlyIdempotent

Retrieve a GitLab commit by SHA from a specified project, optionally including stats, to inspect changes and verify revision details.

Instructions

Get one commit by SHA.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sha": "<sha>"
    },
    "name": "gitlab_get_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
shaYes
statsNo
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.0
    • removedInput schema / properties / stats / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / stats / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the description adds nothing on the safety profile. It also omits behavior beyond the annotations: what happens when the SHA is unknown, whether a project scope is needed, or whether the response includes stats.

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

Conciseness3/5

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

The single front-loaded sentence has zero waste, but at six words it is under-specified rather than genuinely concise for a three-parameter tool.

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?

For a simple read tool with rich annotations and no output schema, the safety story is covered, but two of three parameters and error behavior are undocumented, so an agent cannot confidently call it in a project-scoped context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 3 parameters, so the description must compensate and does not. It restates only `sha`, leaving `stats` (include diff statistics?) and `project_id` (optional scope, default behavior) completely unexplained.

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 one commit") plus the keying mechanism ("by SHA"), which is enough to distinguish it from diff-oriented siblings such as gitlab_get_commit_diff. It does not explicitly name or rule out any sibling, so it stops short of a 5.

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?

No guidance on when to use this versus gitlab_get_commit_diff, gitlab_list_commit_statuses, or other commit-related tools, and no mention of prerequisites. The agent must infer usage from the name alone.

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

Deploy Server

Other Tools