Skip to main content
Glama

git_status

Check the status of your Git working tree to see tracked, untracked, and staged changes before committing.

Instructions

Shows the working tree status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Implementation Reference

  • Core implementation of the git_status tool, executing repo.git.status() using gitpython.
    def git_status(repo: git.Repo) -> str: return repo.git.status()
  • Pydantic input schema for the git_status tool, defining the required repo_path.
    class GitStatus(BaseModel): repo_path: str
  • Registration of the git_status tool in the list_tools() decorator method.
    Tool( name=GitTools.STATUS, description="Shows the working tree status", inputSchema=GitStatus.schema(), ),
  • Dispatch handler in call_tool() that invokes git_status and formats the TextContent response.
    case GitTools.STATUS: status = git_status(repo) return [TextContent( type="text", text=f"Repository status:\n{status}" )]
  • Enum constant defining the tool name 'git_status' in GitTools.
    STATUS = "git_status"

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/martinsky999/mcp-git-py'

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