Get Commit Diff
bitbucket_get_commit_diffGet the unified diff for a commit in Bitbucket Data Center, showing all changed lines. Use an optional file path to view only one file's diff.
Instructions
Get the diff for a specific commit.
Returns the unified diff showing all changes introduced by the commit.
Optionally restrict to a single file with path.
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": {
"project_key": "<project_key>",
"repository_slug": "<repository_slug>",
"commit_id": "<commit_id>"
},
"name": "bitbucket_get_commit_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Restrict diff to a specific file path | |
| commit_id | Yes | The commit hash (full or abbreviated) | |
| whitespace | No | Whitespace handling: SHOW, IGNORE_ALL, or IGNORE_TRAILING | |
| project_key | Yes | The project key | |
| context_lines | No | Number of context lines around changes (default: 10) | |
| repository_slug | Yes | The repository slug | |
| response_format | No | Output format: markdown (default) or json | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |