get_repo_status
Check git repository status to view current branch, uncommitted changes, and staged/modified/untracked files before committing.
Instructions
Get the current status of the git repository.
This tool provides a snapshot of the repository's state, including:
Initialization status (is it a git repo?)
Current branch name
Whether there are uncommitted changes
Lists of staged, modified, and untracked files
Use this tool before committing to verify what changes will be included, or to simply check the current context (branch, pending changes).
Args: repo_path: The absolute path to the repository.
Returns: A JSON-formatted string containing the repository status details.
Example JSON structure:
{
"is_initialized": true,
"current_branch": "main",
"has_changes": true,
"staged_files": ["file1.py"],
"modified_files": ["file2.py"],
"untracked_files": ["new_file.py"]
}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_path": "<repo_path>"
},
"name": "get_repo_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |