Get Commit
get_commitFetch commit metadata, author details, message, and unified git diffs for a specific commit SHA or reference. Output is token-optimized and truncated to conserve context.
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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Commit SHA, branch name, or tag reference to inspect | |
| repo | Yes | Repository name (e.g. 'Hello-World' or 'mcp-github') | |
| owner | Yes | Repository owner (user or organization, e.g. 'octocat' or 'buggycode') | |
| file_path | No | Optional file path filter: only include diff and stats for this single file | |
| max_diff_lines | Yes | Maximum unified diff lines to return across files to conserve LLM context tokens (default: 400) |