git
v1.0.1Git log, diff, blame, branch stats for AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
git_log
Get commit history from a local Git repository. Returns last N commits with hash, author, date, and message. Supports filtering by author, date range, and file path.
| Parameter | Type | Description |
|---|---|---|
repoPath * | string | Absolute path to the local Git repository. |
author | string | Filter commits by author name or email (substring match). |
count | number | Number of recent commits to return. Defaults to 20. |
path | string | Filter commits that touched this file or directory path. |
since | string | Show commits after this date (ISO 8601 or natural language). |
until | string | Show commits before this date. |
git_diff
Show diff between two commits, branches, or tags in a local Git repository. Returns a summary of files changed, insertions, deletions, and the full or filtered diff output.
| Parameter | Type | Description |
|---|---|---|
repoPath * | string | Absolute path to the local Git repository. |
from | string | Start ref (commit hash, branch, tag). Defaults to HEAD~1. |
path | string | Limit diff to a specific file or directory. |
summaryOnly | boolean | If true, return only stat summary without full diff. |
to | string | End ref. Defaults to HEAD. |
git_blame
Show who last modified each line of a file in a local Git repository, with commit hash, author, date, and line content.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the file (relative to repo root). |
repoPath * | string | Absolute path to the local Git repository. |
endLine | number | End line number (1-based, inclusive). |
ref | string | Commit ref to blame at (defaults to HEAD). |
startLine | number | Start line number (1-based). |
git_stats
Get comprehensive statistics for a local Git repository: total commits, contributors, first/last commit dates, commits per author, commits per month, and most frequently changed files.
| Parameter | Type | Description |
|---|---|---|
repoPath * | string | Absolute path to the local Git repository. |
topAuthors | number | Number of top authors to include. Defaults to 10. |
topFiles | number | Number of most-changed files to include. Defaults to 10. |
git_branch
List branches in a local Git repository with last commit info, ahead/behind counts relative to a base branch, and merged/unmerged status.
| Parameter | Type | Description |
|---|---|---|
repoPath * | string | Absolute path to the local Git repository. |
baseBranch | string | Base branch to compare against. Defaults to 'main' or 'master'. |
includeRemote | boolean | Include remote-tracking branches. |
mergedOnly | boolean | Show only branches merged into base branch. |
unmergedOnly | boolean | Show only branches NOT merged into base branch. |