get_file_content
Retrieve the content of a file from any GitLab repository by providing the project path, file path, and an optional branch or commit reference.
Instructions
Get the content of a file from the repository.
Args: project_path: Full path of the project (e.g., 'group/project') file_path: Path to the file within the repository ref: Branch name, tag, or commit SHA (defaults to 'main')
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_path": "<project_path>",
"file_path": "<file_path>"
},
"name": "get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | main | |
| file_path | Yes | ||
| project_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| size | Yes | ||
| content | Yes | ||
| file_name | Yes | ||
| file_path | Yes |