get_file_content
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
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch name, tag, or commit SHA (default: project's default branch) | |
| project | Yes | Project identifier — either a numeric ID (e.g. '12345') or a namespace/project path (e.g. 'atlas/athena') | |
| end_line | No | Last line to read, inclusive; omit for end of file | |
| file_path | Yes | Path to the file within the repository (e.g. 'src/main.py') | |
| start_line | No | First line to read (1-based) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||