Get Commit
get_commitRetrieve detailed commit metadata, author info, and unified diffs for a specific commit SHA or reference to review code changes or investigate regressions. Diffs are token-optimized and truncated.
Instructions
Get detailed commit metadata, author information, message, and unified git diffs for a specific commit SHA or reference. Eager daily driver tool for reviewing code modifications, patches, or investigating regressions. Output diffs are token-optimized and automatically truncated to max_diff_lines (default: 400 lines).
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": {
"owner": "<owner>",
"repo": "<repo>",
"ref": "<ref>",
"max_diff_lines": "<max_diff_lines>",
"ignore_lockfiles": "<ignore_lockfiles>",
"format": "<format>"
},
"name": "get_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Commit SHA, branch name, or tag reference to inspect | |
| path | No | Optional file path filter: only include diff and stats for this single file | |
| repo | Yes | Repository name (e.g. 'Hello-World' or 'mcp-github') | |
| owner | Yes | Repository owner (user or organization, e.g. 'octocat' or 'buggycode') | |
| format | Yes | Output format: 'markdown' (default) or 'json' | markdown |
| max_diff_lines | Yes | Maximum unified diff lines to return across files to conserve LLM context tokens (default: 400) | |
| ignore_lockfiles | Yes | If true, automatically collapses diffs for lockfiles and minified assets (default: true) |