gitlab mcp

get_file_contents

Get the contents of a file or directory from a GitLab project

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to the file or directory
project_idYesProject ID or URL-encoded path
refNoBranch/tag/commit to get contents from

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "file_path": { "description": "Path to the file or directory", "type": "string" }, "project_id": { "description": "Project ID or URL-encoded path", "type": "string" }, "ref": { "description": "Branch/tag/commit to get contents from", "type": "string" } }, "required": [ "project_id", "file_path" ], "type": "object" }