Get File Tool
get_file_toolRetrieve a file from a GitLab repository by project ID and path, with optional branch, tag, or commit ref. Returns file metadata and base64-encoded content.
Instructions
Get a file from a GitLab repository.
Returns file metadata and content (base64 encoded).
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_id": "<project_id>",
"file_path": "<file_path>"
},
"name": "get_file_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA (default: HEAD) | HEAD |
| file_path | Yes | Path to the file in the repository | |
| project_id | Yes | Project ID or path |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||