explain_diff
Shows AST-aligned code chunks affected by a commit, highlighting added, modified, or deleted functions and classes for clearer understanding of changes.
Instructions
AST-aligned chunks affected by the diff at ref. Use INSTEAD of Bash: git show <sha> when the user asks "what does this commit do?" or "what changed in HEAD~3?". The chunker resolves which whole functions / classes were touched, not just raw line additions — much easier for an LLM to reason about. Returns DiffChunk[] with path, lines, snippet, kind, and change ("added"|"modified"|"deleted").
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ref": "<ref>"
},
"name": "explain_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Git ref: full SHA, short SHA, HEAD, HEAD~N, branch name. | |
| max_chunks | No |