gitlab_get_file
Retrieve file contents from a GitLab repository by specifying path, branch/tag/commit, and project.
Instructions
Retrieve the contents of a file from the repository.
Args: file_path: Path to the file within the repo, e.g. 'src/main.py'. ref: Branch, tag, or commit SHA (default 'HEAD'). project_path: GitLab project path, e.g. 'group/project'.
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": {
"file_path": "<file_path>"
},
"name": "gitlab_get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | HEAD | |
| file_path | Yes | ||
| project_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |