gitlab_get_file_content
Retrieve raw content from a GitLab repository file at a specific branch, tag, or commit SHA. Use it to access source code, configurations, or documentation directly from the repository.
Instructions
Retrieve raw content of a file from the repository at a specific ref (branch/tag/commit SHA). Returns the file content as a string. Useful for reading source code, configs, or documentation.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_path | Yes | File path in repository (string). Use forward slashes. Example: 'src/main.py' or 'docs/README.md' | |
project_id | No | Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided | |
ref | No | Git reference: branch name, tag name, or commit SHA. Optional - defaults to project's default branch (usually 'main' or 'master') |