Skip to content

Inspect tools are read-only — they never modify repository state. Use them freely to understand the current state of a repository before taking action.

git_status

Shows the working tree status: staged files, unstaged modifications, and untracked files.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
response_format"markdown" | "json""markdown"Output format

Example:

json
{ "tool": "git_status", "params": { "repo_path": "/home/user/myproject" } }

git_log

Shows the commit history with optional filtering.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
limitnumber30Number of commits to return (1–200)
offsetnumber0Number of commits to skip (for pagination)
authorstringFilter by author name or email
grepstringFilter commits whose message matches this string
sincestringShow commits after this date (e.g. "2024-01-01", "1 week ago")
untilstringShow commits before this date
file_pathstringLimit to commits that touched this file
response_format"markdown" | "json""markdown"Output format

Example — last 10 commits by a specific author:

json
{
  "tool": "git_log",
  "params": {
    "repo_path": "/home/user/myproject",
    "limit": 10,
    "author": "alice"
  }
}

git_show

Shows the details of a specific commit, tag, or tree object.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
refstring*Commit SHA, tag, branch, or any valid Git ref
response_format"markdown" | "json""markdown"Output format

Example:

json
{
  "tool": "git_show",
  "params": { "repo_path": "/home/user/myproject", "ref": "a1b2c3d" }
}

git_diff

Shows differences between commits, branches, or the working tree and index.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
mode"unstaged" | "staged" | "refs""unstaged"What to diff. unstaged = working tree vs index; staged = index vs HEAD; refs = between two refs
from_refstringRequired when mode is refs. Starting ref
to_refstringRequired when mode is refs. Ending ref
filteredbooleanfalseWhen true, returns only file names rather than full patch
response_format"markdown" | "json""markdown"Output format

Example — diff between two branches:

json
{
  "tool": "git_diff",
  "params": {
    "repo_path": "/home/user/myproject",
    "mode": "refs",
    "from_ref": "main",
    "to_ref": "feature/my-feature"
  }
}

git_blame

Shows who last modified each line of a file.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
file_pathstring*Path to the file (relative to repo root)
refstringHEADBlame at this commit or ref
response_format"markdown" | "json""markdown"Output format

Example:

json
{
  "tool": "git_blame",
  "params": { "repo_path": "/home/user/myproject", "file_path": "src/index.ts" }
}

git_reflog

Shows the reference log — a history of where HEAD and branches have pointed.

Useful for recovering commits after a hard reset or accidental branch deletion.

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
limitnumber30Number of entries to return (1–200)
response_format"markdown" | "json""markdown"Output format

Example:

json
{ "tool": "git_reflog", "params": { "repo_path": "/home/user/myproject", "limit": 50 } }

Released under the MIT License.