Skip to main content
Glama
pdogra1299
by pdogra1299

get_file_content

Read file contents from Bitbucket repositories using workspace, repository, and file path; fetch line windows or full/tail content as needed.

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.

Input Schema

TableJSON 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/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that windows are applied server-side, the 5000-line-per-call cap, and that negative start_line triggers a tail fetch of the whole file. It omits error behavior, defaults for line_count, and auth/permission requirements.

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

Conciseness4/5

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

Two tight sentences with the default behavior and the 5000-line limit front-loaded, followed by the exception and a preference hint. Dense but not wasteful; the parenthetical tail note is slightly compressed but readable.

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-param read tool with no annotations and no output schema, the description covers the important fetch-mode semantics and limits. Remaining gaps (return format, error cases, line_count defaults) are minor relative to what is disclosed.

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%, and the description adds real meaning beyond it: the server-side nature of start_line/line_count, the 5000-line ceiling per call, and the tail semantics of negative start_line. It still doesn't clarify how line_count behaves without start_line or default 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?

States a specific verb+resource ('Read a file') and immediately frames the core behavioral model: windowed reads by default with a full-content escape hatch. It is clearly distinguishable from siblings like list_directory_content or get_pull_request_diff, though it doesn't explicitly name what it is not.

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 clear guidance on mode selection ('prefer windows', use full_content or negative start_line only when the whole file is needed). It lacks explicit when-not guidance or named alternatives, but the default-mode guidance is actionable.

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