Git Set Working Directory
git_set_working_dirSet the session working directory for git operations, allowing subsequent commands to omit path parameters.
Instructions
Set the session working directory for all git operations. This allows subsequent git commands to omit the path parameter and use this directory as the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the git repository to use as the working directory. | |
| validateGitRepo | No | Validate that the path is a Git repository. | |
| initializeIfNotPresent | No | If not a Git repository, initialize it with 'git init'. | |
| includeMetadata | No | Include repository metadata (status, branches, remotes, recent commits) in the response. Set to true for immediate repository context understanding. Defaults to false to minimize response size. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| path | Yes | The working directory that was set. | |
| message | Yes | Confirmation message. | |
| repositoryContext | No | Rich repository metadata including status, branches, remotes, and recent history. Only included when includeMetadata parameter is true. |