gitlab_get_repository_file
Fetch a file's content from any GitLab project by providing project ID and file path, with optional branch, tag, or SHA to target a specific version. Returns base64-encoded content.
Instructions
File contents (GET /repository/files/:path). content is base64.
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": {
"projectId": "<projectId>",
"filePath": "<filePath>"
},
"name": "gitlab_get_repository_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or SHA. Default: the project's default HEAD. | |
| filePath | Yes | ||
| projectId | Yes | Numeric ID or path with namespace, e.g. group/project. |