Skip to main content
Glama

create_or_update_file

Create or update files in GitHub repositories by providing content and commit messages, using SHA for updates to manage repository changes.

Instructions

Create or update a file in a repository. To update, you must provide the current file's SHA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
pathYesFile path in the repository
contentYesFile content (plain text, will be base64 encoded automatically)
messageYesCommit message
branchNoBranch name (defaults to default branch)
shaNoCurrent blob SHA of the file (required for updates, omit for new files)

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