Skip to main content
Glama

git_status

Check Git repository status to view tracked, untracked, and staged file changes in your working tree.

Instructions

Shows the working tree status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Implementation Reference

  • Core handler function that executes the git status command on the given repository using repo.git.status().
    def git_status(repo: git.Repo) -> str: return repo.git.status()
  • Pydantic BaseModel defining the input schema for the git_status tool, requiring a repo_path string.
    class GitStatus(BaseModel): repo_path: str
  • Registration of the git_status tool in the list_tools() method, specifying name, description, and input schema.
    name=GitTools.STATUS, description="Shows the working tree status", inputSchema=GitStatus.model_json_schema(),
  • Dispatch handler in the main call_tool function that invokes git_status and formats the response as TextContent.
    case GitTools.STATUS: status = git_status(repo) return [TextContent( type="text", text=f"Repository status:\n{status}" )]
  • Enum value in GitTools defining the tool name 'git_status'.
    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/modelcontextprotocol/git'

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