Get file contents
gitlab_get_fileRead file contents from a GitLab repository, returning text or viewable images by specifying branch, tag, or commit.
Instructions
Reads a file from the repository. Text comes back decoded; set as_image=true to look at an image committed to the repo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag or commit SHA (default: default branch) | |
| as_image | No | Return the file as a viewable image (for PNG/JPEG/GIF/WebP stored in the repo) | |
| file_path | Yes | Path inside the repository, e.g. `src/index.ts` | |
| project_id | No | Project id or URL-encoded path, e.g. `42` or `group/subgroup/project`. Falls back to GITLAB_PROJECT_ID. |