Git Staged Diff
git_staged_diffRetrieve the staged diff and file status list to write a commit message. Use this read-only tool to inspect changes before committing.
Instructions
Return the staged diff (git diff --cached) plus a per-file status list, for writing a commit message.
This is the first step of the aicommit workflow: read the diff, write a Conventional Commit message, then call git_commit. Read-only.
Args:
repo_path (string, optional): repository path (default: server cwd)
max_bytes (number, optional): truncate the diff above this size (default 100000)
Returns JSON: { diff, files: [{ path, status }], isEmpty, truncated }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | No | Path to the git repository. Defaults to the server's working directory. | |
| max_bytes | No | Truncate diff above this many bytes |