Skip to main content
Glama

get_file_content

Retrieve file contents directly from Bitbucket repositories without cloning. Specify repository, file path, and branch to access code or documentation.

Instructions

Get the content of a file from a repository.

Read file contents without cloning the repository.

Args:
    repo_slug: Repository slug
    path: File path (e.g., "src/main.py", "README.md")
    ref: Branch, tag, or commit hash (default: "main")

Returns:
    File content as text (or error if binary/not found)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
pathYes
refNomain
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: the read-only nature ('Get', 'Read'), the no-clone constraint, and error conditions for binary/not-found files. However, it lacks details on authentication requirements, rate limits, response formats beyond 'text', or handling of large files.

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 efficiently structured with a clear purpose statement followed by organized sections for Args and Returns. Every sentence adds value: the first establishes context, the second adds behavioral constraint, and the parameter/return details are essential for understanding. No wasted words.

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?

For a read operation with no annotations and no output schema, the description provides good coverage: purpose, usage context, parameter semantics, and return behavior. It lacks only minor details like authentication needs or exact error formats, but is largely complete for the tool's complexity.

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

Parameters5/5

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

The description adds significant meaning beyond the 0% schema coverage. It explains all three parameters: repo_slug ('Repository slug'), path with examples ('File path (e.g., "src/main.py", "README.md")'), and ref with default and format ('Branch, tag, or commit hash (default: "main")'). This fully compensates for the schema's lack of descriptions.

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 the specific action ('Get the content of a file') and resource ('from a repository'), distinguishing it from sibling tools like list_directory (which lists files) or get_commit (which retrieves commit data). It precisely defines the tool's scope as reading file contents without cloning.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Read file contents without cloning the repository'), which implicitly distinguishes it from operations that require repository cloning. However, it doesn't explicitly mention when NOT to use it or name specific alternatives like list_directory for browsing or get_commit for metadata.

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/JaviMaligno/mcp-server-bitbucket'

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