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
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes |
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
- src/mcp_server_code_assist/server.py:122-125 (registration)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"