Read a file as the pull request leaves it
get_fileRead the full file at a pull request's source commit when a diff hunk lacks surrounding context. See the complete code to review changes accurately.
Instructions
Read a whole file at the pull request's source commit. A diff shows changed lines but not the code around them, so use this when a hunk cannot be judged on its own.
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": {
"pull_request_id": "<pull_request_id>",
"path": "<path>"
},
"name": "get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path within the repository, as it appears in the diff | |
| max_chars | No | Truncate past this many characters | |
| repo_slug | No | Repository slug, e.g. "billing-api". Defaults to BITBUCKET_REPO_SLUG. | |
| workspace | No | Bitbucket workspace ID, e.g. "acme". Defaults to BITBUCKET_WORKSPACE. | |
| pull_request_id | Yes | Pull request number, used to resolve the commit |