git_merge_diff
Generate a text diff for a Git merge commit against its first parent in a local repository. Specify the commit hash and repository path to analyze merge changes.
Instructions
Generates the text diff for a Git merge commit against its first parent within a specified local repository.
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": {
"commitHash": "<commitHash>",
"repoPath": "<repoPath>"
},
"name": "git_merge_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commitHash | Yes | The Git commit hash (SHA) of the merge commit. | |
| repoPath | Yes | The absolute path to the local Git repository directory. |
Implementation Reference
- src/toolRegistrar.ts:11-16 (registration)Registers the 'git_merge_diff' tool with the MCP server, referencing imported schema and handler from './tools/gitMergeDiff/gitMergeDiff.js'.
server.tool( "git_merge_diff", "Generates the text diff for a Git merge commit against its first parent within a specified local repository.", gitMergeDiffSchema, gitMergeDiffHandler );