Get repository file
get_fileFetch a single file from a GitLab repository at a specified ref. Decodes base64 text by default; supports line ranges for partial content.
Instructions
Fetch one repository file at a ref. Text is decoded from base64 by default; binary or unusually large content stays 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": {
"project": "<project>",
"path": "<path>"
},
"name": "get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| path | Yes | ||
| project | Yes | GitLab project ID or full path such as group/project. | |
| end_line | No | ||
| start_line | No | ||
| decode_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | GitLab response normalized for model use. |