Updated
On this page
Git MCP tools scoped to an agent's worktree: status, diff, commit, and log commands with timeout enforcement and -C path isolation.
#src.wesktop.mcp_tools.git
#src.wesktop.mcp_tools.git
Git MCP tools scoped to an agent's worktree: status, diff, commit, and log commands with timeout enforcement and -C path isolation.
All commands run with -C
#_run
python
def _run(worktree: str, *args: str, timeout: int=30) -> tuple[str, str, int]Run a git command in the worktree with a timeout.
Returns (stdout, stderr, returncode). Never raises on git failure.
#git_status
python
def git_status(worktree: str) -> strShow working tree status (porcelain format).
#git_diff
python
def git_diff(worktree: str, path: str='') -> strShow unstaged changes. Optionally limited to a specific file path.
#git_commit
python
def git_commit(worktree: str, message: str) -> strStage all changes and commit with the given message.
#git_log
python
def git_log(worktree: str, count: int=20) -> strShow recent commit log (oneline format).