bitbucket_get_file_content
Retrieve a file's content from a Bitbucket repository by providing workspace, repository, file path, and branch. Returns JSON with content and metadata.
Instructions
Get the content of a specific file from a repository.
Args: workspace: Workspace name or project key. repository: Repository name. file_path: Path to the file in the repository. branch: Branch name to read from (default: main).
Returns: JSON string containing file content and metadata.
Raises: ValueError: If the Bitbucket client is not configured or available.
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": {
"workspace": "<workspace>",
"repository": "<repository>",
"file_path": "<file_path>"
},
"name": "bitbucket_get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Branch name to read from | main |
| sample | No | Read top N lines of a file. -1 for full file content. | |
| file_path | Yes | Path to the file in the repository | |
| workspace | Yes | Workspace name (Cloud) or project key (Server/DC) | |
| repository | Yes | Repository name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |