get_file_contents
Retrieve file contents from a Bitbucket repository at a specific branch, tag, or commit to access code and configuration files.
Instructions
Get the contents of a file from a repository at a specific branch/commit.
Args: repo_slug: Repository slug (name) file_path: Path to the file in the repository ref: Branch name, tag, or commit hash (default: main) workspace: Bitbucket workspace (optional if configured)
Returns: File contents as text
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_slug": "<repo_slug>",
"file_path": "<file_path>"
},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_slug | Yes | ||
| file_path | Yes | ||
| ref | No | main | |
| workspace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||