Git stash
git_stashPause work by stashing tracked or untracked changes, then list, show, apply, pop, or drop stashes to switch branches or commit selectively.
Instructions
Stash push/list/apply/pop/drop/show. Push stashes staged+unstaged tracked changes (add include_untracked=true for untracked files). Use when: you need to pause work to switch branches or commit selectively. Avoid when: you need to stash and keep a copy (stash keeps one; use apply over pop) or drop permanently (prefer apply, then commit). Output: push: pushed, message, selector, output. list: entries[] {selector, sha, subject}, count. apply/pop/drop: applied/dropped. show: files[], count.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_stash"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Optional workspace-relative paths to limit what gets stashed. | |
| action | No | push: stash changes; list: list stashes; apply/pop/drop: apply/pop/drop a stash; show: list files in a stash. | list |
| reason | No | Optional why (max 400 chars), audit-logged. | |
| message | No | Optional message for action=push. | |
| selector | No | Stash selector (default stash@{0}); format stash@{N}. | |
| include_untracked | No | true includes untracked files when pushing. |