git

v1.0.1
io.github.rog0x/git Checked 1 day ago Published 8 months ago

Git 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.

ParameterTypeDescription
repoPath *stringAbsolute path to the local Git repository.
authorstringFilter commits by author name or email (substring match).
countnumberNumber of recent commits to return. Defaults to 20.
pathstringFilter commits that touched this file or directory path.
sincestringShow commits after this date (ISO 8601 or natural language).
untilstringShow 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.

ParameterTypeDescription
repoPath *stringAbsolute path to the local Git repository.
fromstringStart ref (commit hash, branch, tag). Defaults to HEAD~1.
pathstringLimit diff to a specific file or directory.
summaryOnlybooleanIf true, return only stat summary without full diff.
tostringEnd 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.

ParameterTypeDescription
filePath *stringPath to the file (relative to repo root).
repoPath *stringAbsolute path to the local Git repository.
endLinenumberEnd line number (1-based, inclusive).
refstringCommit ref to blame at (defaults to HEAD).
startLinenumberStart 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.

ParameterTypeDescription
repoPath *stringAbsolute path to the local Git repository.
topAuthorsnumberNumber of top authors to include. Defaults to 10.
topFilesnumberNumber 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.

ParameterTypeDescription
repoPath *stringAbsolute path to the local Git repository.
baseBranchstringBase branch to compare against. Defaults to 'main' or 'master'.
includeRemotebooleanInclude remote-tracking branches.
mergedOnlybooleanShow only branches merged into base branch.
unmergedOnlybooleanShow only branches NOT merged into base branch.