Skip to main content
Glama
Bitbucket MCP Server
by pdogra1299

get_file_content

Read-only

Reads file content from a Bitbucket repository, fetching only a specific line range by default or the entire file on demand.

Instructions

Read a file. Windowed by default (start_line/line_count fetch ONLY that window server-side; ≤5000 lines per call). full_content=true or negative start_line (tail) fetches the whole file — prefer windows.

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": "get_file_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchNoBranch (default: default branch)
file_pathYes
workspaceYesProject key (e.g., PROJ)
line_countNo
repositoryYesRepository slug
start_lineNo1-based; negative = from end
full_contentNoEntire file regardless of size

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv3.0.1
    • changedInput schema / properties / branch / description
      Previous value: -"Branch name (optional, defaults to default branch)"New value: +"Branch (default: default branch)"
    • removedInput schema / properties / file_path / description
      Removed value: -"Path to the file (e.g., \"src/index.ts\")"
    • changedInput schema / properties / full_content / description
      Previous value: -"Force return full content regardless of size (optional, default: false)"New value: +"Entire file regardless of size"
    • removedInput schema / properties / line_count / description
      Removed value: -"Number of lines to return (optional, default varies by file size)"
    • changedInput schema / properties / repository / description
      Previous value: -"Repository slug (e.g., \"my-repo\")"New value: +"Repository slug"
    • changedInput schema / properties / start_line / description
      Previous value: -"Starting line number (1-based). Use negative for lines from end (optional)"New value: +"1-based; negative = from end"
    • changedInput schema / properties / workspace / description
      Previous value: -"Bitbucket workspace/project key (e.g., \"PROJ\")"New value: +"Project key (e.g., PROJ)"
  2. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, so the description adds real value by disclosing a hard cap (≤5000 lines per call), server-side windowing semantics, and tail behavior via negative start_line. It omits error/binary-file behavior and the default window size, which keeps it at 4 rather than 5.

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?

Two tight sentences with the default behavior front-loaded, then the mode switches, then the recommendation. Every clause carries information; nothing is redundant with the schema or annotations.

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 7-parameter read tool with no output schema, the description covers the critical decision points (window vs. full, size limit, tail mode). The main residual gap is the unspecified default window size when neither start_line nor line_count is given.

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 71%, so the baseline is 3; the description earns above that by explaining parameter interaction the schema does not — that start_line/line_count fetch only that window server-side, and that full_content or a negative start_line both trigger whole-file retrieval. It still doesn't define a default line_count or the meaning of edge values.

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

Purpose4/5

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

"Read a file" is a specific verb+resource, and the description immediately qualifies scope with the windowing model, distinguishing it from list_directory_content by making clear it returns file contents rather than listings. It stops short of naming siblings explicitly, so a 4 rather than a 5.

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?

Gives an explicit preference rule ("prefer windows") and states the exact conditions that switch modes: full_content=true or negative start_line. There are no explicit when-not cases against sibling tools, but the mode-selection guidance is concrete and actionable.

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