Skip to main content
Glama

get_file_contents

Retrieve file contents or directory listings from GitHub repositories. Specify owner, repo, and path to access structured JSON data with type information for consistent parsing.

Instructions

Get the contents of a file or directory listing in a repository. Returns JSON with a 'type' field ('file' or 'directory') for consistent parsing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
pathYesFile path in the repository
refNoBranch name, tag, or commit SHA (defaults to 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/software-engineer-mj/github-mcp'

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