Skip to main content
Glama

bitbucket_get_file_content

Retrieve file content and metadata from a Bitbucket repository given workspace, repo, file path, and branch. Optionally limit to top N lines.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch name to read frommain
sampleNoRead top N lines of a file. -1 for full file content.
file_pathYesPath to the file in the repository
workspaceYesWorkspace name (Cloud) or project key (Server/DC)
repositoryYesRepository name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It discloses that the tool returns a JSON string with content and metadata, and raises ValueError if client is unavailable. However, it does not mention authentication requirements, rate limits, file size limits, or what happens with binary files. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with Args, Returns, Raises sections. Every sentence adds value and the format is highly readable for an AI agent. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description appropriately summarizes return as 'JSON string containing file content and metadata.' It covers the core functionality but could mention encoding handling or binary file limitations. Still fairly complete for a file retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema, e.g., workspace can be name or project key, branch defaults to 'main', and sample parameter is explained with the -1 meaning. This extra context improves usability.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get the content of a specific file from a repository.' It uses a specific verb and resource, distinguishing it from siblings like bitbucket_list_directory which lists file names without content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives such as bitbucket_list_directory or bitbucket_get_commit_changes. The description implies use for reading file contents but does not compare or contrast with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SharkyND/mcp-atlassian'

If you have feedback or need assistance with the MCP directory API, please join our Discord server