Get File Content
get_file_contentRetrieve raw text content of a file from a Bitbucket repository at a specific commit or branch. Automatically rejects directories, oversized files, and binary content.
Instructions
Get the raw text content of a file at a given commit or branch.
A metadata pre-check rejects directories, oversized files (> max_bytes) and binary files before downloading, to protect the token budget.
Args: repo_slug: Repository slug commit: Commit hash (a simple branch/tag name also works; a branch name containing '/' is ambiguous on /src — resolve it to a hash first) path: File path within the repository workspace: Workspace name (optional, defaults to configured workspace) max_bytes: Maximum file size to return (default: 262144 = 256 KiB)
Returns: File content as text
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| commit | Yes | ||
| max_bytes | No | ||
| repo_slug | Yes | ||
| workspace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |