get_commit_diff
Retrieve the diff of a specific commit from a Bitbucket Server repository, with optional file path and context lines.
Instructions
Get the diff for a specific commit.
Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. context_lines: Number of context lines around changes (default 10, max 100). src_path: Optional path to restrict the diff to a specific file.
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>",
"repo_slug": "<repo_slug>",
"commit_id": "<commit_id>"
},
"name": "get_commit_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_key | Yes | ||
| repo_slug | Yes | ||
| commit_id | Yes | ||
| context_lines | No | ||
| src_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |