Skip to main content
Glama

git_status

Check Git repository status to view staged, unstaged, and untracked files for managing code changes.

Instructions

Shows git repository status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Implementation Reference

  • Core implementation of git_status tool: executes 'git status' using GitPython library on the given repo_path.
    async def status(self, repo_path: str) -> str: """Get git repository status.""" repo = git.Repo(repo_path) return repo.git.status()
  • Pydantic model defining the input schema for git_status tool (requires repo_path).
    class GitStatus(BaseModel): repo_path: str
  • MCP tool registration in list_tools(): defines name, description, and input schema for git_status.
    name=CodeAssistTools.GIT_STATUS, description="Shows git repository status", inputSchema=GitStatus.model_json_schema(), ),
  • Tool dispatcher in call_tool() that validates input with GitStatus model and calls GitTools.status().
    case CodeAssistTools.GIT_STATUS: model = GitStatus(repo_path=arguments["repo_path"]) result = await git_tools.status(model.repo_path) return [TextContent(type="text", text=result)]
  • Enum constant defining the tool name string in CodeAssistTools.
    GIT_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/abhishekbhakat/mcp_server_code_assist'

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