Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

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

NameRequiredDescriptionDefault
file_pathYesFile path in repository (string). Use forward slashes. Example: 'src/main.py' or 'docs/README.md'
project_idNoProject ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided
refNoGit reference: branch name, tag name, or commit SHA. Optional - defaults to project's default branch (usually 'main' or 'master')

Input Schema (JSON Schema)

{ "properties": { "file_path": { "description": "File path in repository (string). Use forward slashes. Example: 'src/main.py' or 'docs/README.md'", "type": "string" }, "project_id": { "description": "Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided", "type": "string" }, "ref": { "description": "Git reference: branch name, tag name, or commit SHA. Optional - defaults to project's default branch (usually 'main' or 'master')", "type": "string" } }, "required": [ "file_path" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijay-Duke/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server