Skip to main content
Glama

get_file_contents

Retrieve file or directory contents from a Git repository by specifying the repository, path, and optional branch/tag/commit reference.

Instructions

Get the contents of a file or directory from a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository identifier (GitLab: "group/project" or ID, GitHub: "owner/repo")
pathYesFile or directory path in the repository
refNoBranch name, tag, or commit SHA (default: default branch)

Latest Blog Posts

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/Ray0907/git-mcp-server'

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