get_file_contents
Retrieve file or directory contents from GitLab projects by specifying project ID, file path, and branch reference to access repository files through API calls.
Instructions
Get the contents of a file or directory from a GitLab project
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 |
Input Schema (JSON Schema)
{
"properties": {
"file_path": {
"description": "Path to the file or directory",
"type": "string"
},
"project_id": {
"description": "Project ID or complete URL-encoded path to project",
"type": "string"
},
"ref": {
"description": "Branch/tag/commit to get contents from",
"type": "string"
}
},
"required": [
"project_id",
"file_path"
],
"type": "object"
}