Skip to main content
Glama

commit_context

Read-onlyIdempotent

Retrieve complete commit details in one call: subject, body, changed files with line counts, totals, linked pull request, and referenced issues. Enriches PR data via GitHub API when token is set.

Instructions

Read-only. Everything about one commit in a single call: subject, body, changed files with per-file insertions/deletions, totals, the linked PR (parsed from the merge message, or via the GitHub API when GH_TOKEN/GITHUB_TOKEN is set), and issue numbers referenced in the message (Fixes #N, Closes #N). Errors if the SHA does not resolve in cwd. May make one outbound GitHub API call for PR enrichment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoPath inside the target git repo. Defaults to the server's current working directory.
shaYesCommit SHA (full or abbreviated) or any revision `git` accepts, e.g. `HEAD`, `HEAD~3`, a tag.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
prNo
shaNo
bodyNo
dateNo
authorNo
subjectNo
deletionsNo
insertionsNo
files_changedNo
related_issuesNo
Behavior4/5

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

Annotations already indicate read-only and idempotent. The description adds crucial context: it may make an outbound GitHub API call for PR enrichment and errors if SHA doesn't resolve. This goes beyond the annotations, though it doesn't detail the response format or all edge cases.

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?

Three sentences, front-loaded with the read-only nature, and efficiently enumerates returned data and special behaviors. Every sentence provides necessary information without redundancy.

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?

Given the presence of an output schema (unseen but flagged), the description covers everything needed: what the tool returns, when it errors, and potential external call. It is fully adequate for an agent to invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining error behavior for the SHA parameter and implying the cwd default. It doesn't repeat schema but provides behavioral context that aids 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 it retrieves detailed information about a single commit (subject, body, changed files, PR, issues). This verb+resource approach is specific and distinct from sibling tools like 'branch_hygiene' or 'recent_work', which focus on different aspects.

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 for getting a comprehensive commit summary but does not explicitly differentiate from siblings or state when not to use. It does mention an important behavioral constraint (external GitHub call) and error condition, providing some 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/HasanJahidul/git-insight-mcp'

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