get_file_contents
Retrieve contents of a file or directory from a GitLab project by specifying project ID and file path, optionally with branch, tag, or commit.
Instructions
Get the contents of a file or directory from a GitLab 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": {
"project_id": "<project_id>",
"file_path": "<file_path>"
},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch/tag/commit to get contents from | |
| file_path | Yes | Path to the file or directory | |
| project_id | Yes | Project ID or URL-encoded path |