Skip to main content
Glama

Get a commit

repo_commit_get
Read-onlyIdempotent

Retrieve a specific commit by repository and SHA or ref, including changed files and patch details for code review or auditing.

Instructions

Get one commit with its changed files (patch).

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": {
      "repo": "<repo>",
      "sha": "<sha>"
    },
    "name": "repo_commit_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
shaYesCommit SHA or ref
repoYesRepository path, e.g. "owner/repo" or "group/subgroup/repo"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered. The description adds real value by stating the response includes changed files with patches, but says nothing about patch truncation, large-commit handling, or whether refs are resolved to a SHA.

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?

A single tight sentence with the payload detail front-loaded and no filler. It is appropriately sized for a two-parameter read tool, though it could have bought room for routing guidance at nearly no cost.

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

Completeness4/5

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

For a low-complexity, two-required-parameter read tool with rich annotations, fully documented schema and no output schema, the definition covers what is needed to invoke it correctly. The gap is the absence of sibling routing and edge-case behavior, which is minor at this complexity level.

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 both parameters (sha as 'Commit SHA or ref', repo as 'owner/repo') are fully documented in the schema. The description adds no extra meaning beyond that, which is the expected baseline when the schema carries the burden.

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 pairs a specific verb (get) with a specific resource (one commit) and adds the payload shape ('with its changed files (patch)'). The singular 'one commit' implicitly separates it from the sibling repo_commits_list, but no sibling is named outright.

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?

There is no explicit when-to-use guidance, no prerequisites, and no routing to alternatives such as repo_commits_list for a history listing or repo_diff_compare for comparing two commits. The only usage signal is the implied singular-vs-list distinction.

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