Skip to main content
Glama

git_status

View the working tree status of a Git repository, including tracked and untracked files, staged changes, and branch information, to manage repository updates effectively.

Instructions

Shows the working tree status

Input Schema

NameRequiredDescriptionDefault
repo_pathYes

Input Schema (JSON Schema)

{ "properties": { "repo_path": { "title": "Repo Path", "type": "string" } }, "required": [ "repo_path" ], "title": "GitStatus", "type": "object" }

Implementation Reference

  • Handler execution for git_status tool within the call_tool method, calling git_status and formatting the response.
    case GitTools.STATUS: status = git_status(repo) return [TextContent( type="text", text=f"Repository status:\n{status}" )]
  • Core handler function implementing git_status logic using gitpython Repo.git.status().
    def git_status(repo: git.Repo) -> str: return repo.git.status()
  • Pydantic schema/model for git_status tool input, requiring repo_path.
    class GitStatus(BaseModel): repo_path: str
  • Registration of git_status tool in list_tools(), providing name, description, and schema.
    Tool( name=GitTools.STATUS, description="Shows the working tree status", inputSchema=GitStatus.schema(), ),
  • Enum constant defining the tool name 'git_status' in GitTools.
    STATUS = "git_status"

Other Tools

Related Tools

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