GitHub

create_or_update_file

Create or update a single file in a GitHub repository. If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations. In order to obtain the SHA of original file version before updating, use the following git command: git rev-parse <branch>:<path to file> SHA MUST be provided for existing file updates.

Remote github

Other tools also called create_or_update_file? See providers with this name

Input Schema


            {
  "type": "object",
  "properties": {
    "sha": {
      "type": "string",
      "description": "The blob SHA of the file being replaced. Required if the file already exists."
    },
    "path": {
      "type": "string",
      "description": "Path where to create/update the file"
    },
    "repo": {
      "type": "string",
      "description": "Repository name"
    },
    "owner": {
      "type": "string",
      "description": "Repository owner (username or organization)"
    },
    "branch": {
      "type": "string",
      "description": "Branch to create/update the file in"
    },
    "content": {
      "type": "string",
      "description": "Content of the file"
    },
    "message": {
      "type": "string",
      "description": "Commit message"
    }
  }
}
          

Provider

GitHub →