Skip to main content
Glama

get_file_content

Read-only

Fetch a file's content from a CERN GitLab repository, including metadata and binary file detection. Use to access code or documentation by project and file path.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch name, tag, or commit SHA (default: project's default branch)
projectYesProject identifier — either a numeric ID (e.g. '12345') or a URL-encoded path (e.g. 'atlas/athena')
file_pathYesPath to the file within the repository (e.g. 'src/main.py')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.1.6

TDQS

A4/5.0
Behavior4/5

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

Annotations only include readOnlyHint=true, so the description carries the burden of behavioral disclosure. It adds value by detailing that binary files are detected and reported without decoding, and that metadata (size, encoding, language hint) is returned. This goes beyond the annotation without contradicting it.

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 two concise sentences, front-loaded with the core purpose and followed by key behavioral details. No wasted words; each sentence earns its place.

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, return values need not be explained. The description covers binary handling and metadata, which is sufficient for a simple retrieval tool. It omits error handling or size limits, but these are not critical for basic usage.

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 descriptions cover all three parameters with clear meanings (project, file_path, ref). The description does not add additional parameter-specific semantics beyond what the schema already provides, so the baseline score of 3 applies.

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 states a specific verb ('retrieve') and resource ('content of a specific file from a CERN GitLab repository'), clearly distinguishing it from sibling tools like list_project_files which list files rather than contents. The purpose is unambiguous.

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 implies usage for retrieving file content but does not explicitly mention when to use this tool versus alternatives like list_project_files or search_code. No exclusions or conditions are stated, providing only implied guidance.

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