get_file_content
Fetch raw file content at a branch, tag, or commit hash to view full source context during pull request review.
Instructions
Get the raw content of a file at a given ref (branch name, tag or commit hash). Useful to see full context beyond the diff hunks during a review.
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": {
"repo": "<repo>",
"path": "<path>",
"ref": "<ref>"
},
"name": "get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Branch name, tag or commit hash (e.g. the PR source branch or source_commit from get_pull_request). Branch names containing slashes (e.g. "bugfix/foo") are supported and resolved to a commit hash automatically. | |
| path | Yes | File path inside the repo, e.g. "src/app/main.ts". | |
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |