Skip to main content
Glama

Get exact Git commit

gh_get_commit
Read-onlyIdempotent

Retrieve immutable commit details for a specific SHA from a GitHub repo, including tree, parents, author, committer, message, and verification metadata without altering the verification status.

Instructions

Read-only: return immutable identity and commit-object evidence for one exact 40-character commit SHA. The result includes the tree SHA, every parent SHA, author, committer, message, and GitHub's verification/signature metadata without reinterpreting or upgrading that verification state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesGitHub repository name without the owner prefix.
ownerYesGitHub repository owner or organization login.
commit_shaYesExact 40-character hexadecimal Git commit SHA.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foundYes
authorNo
messageNo
parentsNo
tree_shaNo
committerNo
commit_shaYes
verificationNo
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds the nuance that it returns verification/signature metadata 'without reinterpreting or upgrading that verification state,' which is a behavioral disclosure beyond annotations. This adds context about what the tool does not modify. The score reflects good transparency beyond the annotations.

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 two sentences, front-loaded with 'Read-only:' and then the core purpose. Every sentence contributes value: defining the scope (exact SHA), what is returned, and the verification-state behavior. There is no redundancy or unnecessary detail.

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

Completeness5/5

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

For a simple tool with full schema coverage, safe annotations, and an output schema (which handles return values), the description is complete. It specifies the exact input constraint (40-character SHA), the output components (tree, parents, author, etc.), and the verification behavior. No critical information is missing given the tool's simplicity and existing structured metadata.

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?

The input schema has 100% coverage: each parameter (owner, repo, commit_sha) has a clear description. The description adds minimal new parameter semantics—it reiterates the exact SHA requirement and mentions the commit is immutable, but the schema already states this. Since schema coverage is high, a baseline of 3 is appropriate, and the description doesn't meaningfully extend parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'return immutable identity and commit-object evidence for one exact 40-character commit SHA.' It specifies the resource (a commit by exact SHA) and what information is retrieved (tree SHA, parents, author, committer, message, verification metadata). This distinguishes it from sibling tools like gh_list_pr_commits (list) and gh_compare_commits (compare).

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

Usage Guidelines4/5

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

The description implies usage: it's for retrieving a single commit by its exact 40-character SHA. While it doesn't explicitly mention alternatives or exclusions, the phrase 'exact 40-character commit SHA' makes it clear this is for a precise, single-commit lookup, not for lists or comparisons. The context is unambiguous, but there is no explicit 'when-not' guidance.

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/fvanevski/gh_mcp'

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