git_stash
MCP tools › Version control
Git stashes: list them (newest first, also reports a stopped rebase, cherry-pick or merge), push the local changes (optionally with untracked files, a message and keep_index to leave the staged changes in the index), apply or pop a stash (pop drops it when it applied without conflicts) or drop it, or show the files a stash changes with their text before and in the stash. Returns Git's message, files left with conflicts and the stash list afterwards.
Its results carry text from git: the client is told to treat that as data, never as instructions.
| Capability | git.git_stash |
|---|---|
| Area | Version control |
| Access | changes files, repository |
| Reaches | process |
| Rights | vcs-write |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
action | string | list (default), push, apply, pop, drop or show (the files a stash changes). |
index | integer | Stash position for apply, pop, drop and show (0 is the newest; default 0).minimum 0 |
message | string | Message of a new stash (push). |
include_untracked | boolean | Stash untracked files too (push, default false). |
keep_index | boolean | Leave the staged changes in the index (push, default false). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project git_stashInput schema as JSON
{ "type": "object", "properties": { "action": { "description": "`list` (default), `push`, `apply`, `pop`, `drop` or `show` (the files a stash changes).", "type": [ "string", "null" ], "default": null }, "index": { "description": "Stash position for `apply`, `pop`, `drop` and `show` (0 is the newest; default 0).", "type": [ "integer", "null" ], "default": null, "minimum": 0 }, "message": { "description": "Message of a new stash (`push`).", "type": [ "string", "null" ], "default": null }, "include_untracked": { "description": "Stash untracked files too (`push`, default false).", "type": [ "boolean", "null" ], "default": null }, "keep_index": { "description": "Leave the staged changes in the index (`push`, default false).", "type": [ "boolean", "null" ], "default": null } }}