Skip to main content
Glama

git_commit

Record repository changes with a descriptive message to track project history and maintain version control.

Instructions

Records changes to the repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
messageYes

Implementation Reference

  • The main handler function that performs the git commit operation using repo.index.commit()
    def git_commit(repo: git.Repo, message: str) -> str: commit = repo.index.commit(message) return f"Changes committed successfully with hash {commit.hexsha}"
  • Pydantic model defining the input schema for the git_commit tool, including repo_path and message.
    class GitCommit(BaseModel): repo_path: str message: str
  • Registration of the git_commit tool in the list_tools() function, using the COMMIT enum constant and GitCommit schema.
    Tool( name=GitTools.COMMIT, description="Records changes to the repository", inputSchema=GitCommit.model_json_schema(), ),

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/modelcontextprotocol/git'

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