get_file_contents
Retrieve file or directory contents from a GitLab project by specifying project, path, and ref. Use when you know the exact resource; errors indicate missing permissions, invalid identifiers, or rate limits.
Instructions
Get contents of a file or directory from a GitLab project. Use this for a known resource or result; choose the corresponding list or search tool when you need to discover multiple resources. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch/tag/commit to get contents from | |
| path | No | Alias of file_path | |
| file_path | No | Path to the file or directory. Takes precedence over 'path' when both are provided | |
| project_id | No | Project ID or URL-encoded path (optional; falls back to env) |