commit_context
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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Path inside the target git repo. Defaults to the server's current working directory. | |
| sha | Yes | Commit SHA (full or abbreviated) or any revision `git` accepts, e.g. `HEAD`, `HEAD~3`, a tag. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | No | ||
| sha | No | ||
| body | No | ||
| date | No | ||
| author | No | ||
| subject | No | ||
| deletions | No | ||
| insertions | No | ||
| files_changed | No | ||
| related_issues | No |