Get project diff
get_diffReview staged, uncommitted, or ref-to-ref Git changes via masked unified diff hunks with per-file status, added/removed counts, and secret/private-data redaction.
Instructions
Shows what changed: masked unified diff hunks for a Git scope. Use it to review staged, uncommitted or ref-to-ref changes; use get_file for whole files and search_project for text. Returns per-file status, added/removed counts and hunks with context, largest changes first, under the same secret and private-data redaction as file content, with complete|partial status within 50,000 characters. Key parameters: git_scope=changes|staged|diff:A..B (default changes), paths, include_patterns, context_lines=0..20.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Narrows selection to literal paths for existing project-relative files or directories; glob characters are ordinary. | |
| git_scope | No | Chooses the comparison: changes is HEAD to the working tree including untracked files, staged is HEAD to the index, and diff:<ref>..<ref> compares two commits. | changes |
| context_lines | No | Unchanged lines around each change; hunks whose context touches merge. | |
| include_patterns | No | Narrows with project-relative '/' globs: '*' and '?' stay in one segment, '**/' spans depths, and '{a,b}' alternates; matching is case-sensitive, while '!' and '[...]' are rejected. |