wesktop v0.7.0 /src.wesktop.mcp_tools.git
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 and have timeouts.

#_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) -> str

Show working tree status (porcelain format).

#git_diff

python
def git_diff(worktree: str, path: str='') -> str

Show unstaged changes. Optionally limited to a specific file path.

#git_commit

python
def git_commit(worktree: str, message: str) -> str

Stage all changes and commit with the given message.

#git_log

python
def git_log(worktree: str, count: int=20) -> str

Show recent commit log (oneline format).