GitLab MCP Server

by rifqi96
Verified

gitlab_get_repository_file

Retrieve the content of a specific file from a GitLab repository. Provide the project ID, file path, and branch/tag/commit reference to access file data directly.

Instructions

Get content of a file in a repository

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath of the file in the repository
project_idYesThe ID or URL-encoded path of the project
refNoThe name of branch, tag or commit

Input Schema (JSON Schema)

{ "properties": { "file_path": { "description": "Path of the file in the repository", "type": "string" }, "project_id": { "description": "The ID or URL-encoded path of the project", "type": "string" }, "ref": { "description": "The name of branch, tag or commit", "type": "string" } }, "required": [ "project_id", "file_path" ], "type": "object" }
ID: 7phkmkcd67