Read repository file
gitlab_get_fileRetrieve file content from a GitLab repository at a specified branch, tag, or commit. Access .gitlab-ci.yml or configuration files without a local clone.
Instructions
Returns file content at a ref (branch, tag, or commit SHA). Useful for .gitlab-ci.yml or configs without a local clone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or SHA. Default: project default_branch. | |
| file_path | Yes | File path in the repo (e.g. .gitlab-ci.yml, src/main.ts). | |
| max_chars | No | ||
| repo_path | No | Absolute local clone path; resolves project and MR from current branch. | |
| project_id | No | Numeric ID or group/repo path on GitLab. |