get_file_contents
Retrieve file or directory contents from a GitLab project using project ID, file path, and optional branch reference.
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 |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| file_path | Yes | Path to the file or directory | |
| ref | No | Branch/tag/commit to get contents from |