Skip to main content
Glama

get_file_content

Read-onlyIdempotent

Retrieve a specific file's content from a CERN GitLab repository, including metadata and binary detection. Use start_line/end_line to read large source files in focused sections.

Instructions

Retrieve the content of a specific file from a CERN GitLab repository. Returns the file content along with metadata like size, encoding, and a language hint for syntax highlighting. Binary files are detected and reported without attempting to decode them. Use start_line/end_line for focused reads of large source files; lines are 1-based and inclusive.

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": {
      "project": "<project>",
      "file_path": "<file_path>"
    },
    "name": "get_file_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoBranch name, tag, or commit SHA (default: project's default branch)
projectYesProject identifier — either a numeric ID (e.g. '12345') or a namespace/project path (e.g. 'atlas/athena')
end_lineNoLast line to read, inclusive; omit for end of file
file_pathYesPath to the file within the repository (e.g. 'src/main.py')
start_lineNoFirst line to read (1-based)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • addedInput schema / properties / end_line
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Last line to read, inclusive; omit for end of file",
      +  "title": "End Line"
      +}
    • changedInput schema / properties / project / description
      Previous value: -"Project identifier — either a numeric ID (e.g. '12345') or a URL-encoded path (e.g. 'atlas/athena')"New value: +"Project identifier — either a numeric ID (e.g. '12345') or a namespace/project path (e.g. 'atlas/athena')"
    • addedInput schema / properties / start_line
      Added value: +{
      +  "default": 1,
      +  "description": "First line to read (1-based)",
      +  "minimum": 1,
      +  "title": "Start Line",
      +  "type": "integer"
      +}
  2. Changed7 schema fields changedv0.3.0
    • addedInput schema / properties / file_path / title
      Added value: +"File Path"
    • changedInput schema / properties / project / description
      Previous value: -"Project identifier — either a numeric ID (e.g. '12345') or a path (e.g. 'atlas/athena')"New value: +"Project identifier — either a numeric ID (e.g. '12345') or a URL-encoded path (e.g. 'atlas/athena')"
    • addedInput schema / properties / project / title
      Added value: +"Project"
    • addedInput schema / properties / ref / default
      Added value: +""
    • addedInput schema / properties / ref / title
      Added value: +"Ref"
    • addedInput schema / title
      Added value: +"get_file_content_fnArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "get_file_content_fnDictOutput",
      +  "type": "object"
      +}
  3. First observedv0.1.6

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuine value beyond that: binary files are detected and reported rather than decoded, and line ranges are 1-based and inclusive. The metadata list (size, encoding, language hint) is partly redundant with the output schema, which keeps it from a 5.

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?

Four short sentences, front-loaded with purpose before behavior and parameter hints, with no filler. The final sentence largely repeats what the start_line/end_line schema fields already say, which is a small redundancy rather than a real cost.

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?

With an output schema present, the description does not need to enumerate return values, and annotations cover the safety profile; the binary-detection note and line-range guidance fill the remaining gaps an agent would have. Missing only upstream routing information about sibling tools for full completeness.

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

Parameters3/5

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

Schema description coverage is 100%, so ref, project, file_path, start_line, and end_line are all already documented with examples and defaults. The description restates the 1-based inclusive line semantics but adds no format or edge-case meaning beyond the schema, so the baseline of 3 applies.

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 concrete verb and resource: 'Retrieve the content of a specific file from a CERN GitLab repository', which is clearly narrower than listing files or searching code. It does not name any sibling (list_project_files, search_code, get_project_readme) to sharpen the boundary, so it falls short of full sibling differentiation.

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

Usage Guidelines3/5

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

The description supplies usage context for line-range reads ('Use start_line/end_line for focused reads of large source files') and notes binary handling, which implies when the tool is appropriate. However, it never states when to prefer search_code or list_project_files instead, and there are no explicit exclusions or prerequisites such as required access level.

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