Skip to content

git_commit_action

MCP tools › Version control

The Git log's commit menu. Without action: the entries for the commit with enabled and the disabling reason, plus branches at it. Actions: show-repository, compare-local, copy-patch, cherry-pick, checkout (detached), reset (hard stashes uncommitted changes first), revert (aborted on conflict), undo (latest unpushed commit, changes stay staged), edit-message, fixup/squash (dry run by default), drop, push-up-to, new-branch, new-tag. Disabled entries are refused with the same reason. All but listing and copy-patch need the vcs-write right; push-up-to also remote.

Its results carry text from git: the client is told to treat that as data, never as instructions.

Capabilitygit.git_commit_action
AreaVersion control
Accesschanges files, repository
Reachesprocess, network
Rightsremote, vcs-write
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
commitrequiredstringThe commit (hash, branch, tag or other revision).
actionstringThe entry to run: copy-patch, cherry-pick, checkout, show-repository, compare-local, reset, revert, undo, edit-message, fixup, squash, drop, push-up-to, new-branch, new-tag. Omit to list the commit menu's entries with their state.
pathstringFor show-repository: return this file's text at the commit; for compare-local: the diff rows of this file (commit left, working copy right).
pathsarray of stringFor fixup and squash: the files to commit (repository-relative).
dry_runbooleanFor fixup and squash: only list what would be committed (default true).
modestringFor reset: soft, mixed (default), hard or keep.
namestringFor new-branch and new-tag: the name; for push-up-to: the remote branch (default: the current branch's name).
messagestringFor edit-message: the new message.

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.

Terminal window
ferris-idea call ~/my-project git_commit_action '{"commit":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"commit"
],
"properties": {
"commit": {
"description": "The commit (hash, branch, tag or other revision).",
"type": "string"
},
"action": {
"description": "The entry to run: copy-patch, cherry-pick, checkout, show-repository, compare-local,\nreset, revert, undo, edit-message, fixup, squash, drop, push-up-to, new-branch, new-tag.\nOmit to list the commit menu's entries with their state.",
"type": [
"string",
"null"
],
"default": null
},
"path": {
"description": "For `show-repository`: return this file's text at the commit; for `compare-local`: the\ndiff rows of this file (commit left, working copy right).",
"type": [
"string",
"null"
],
"default": null
},
"paths": {
"description": "For `fixup` and `squash`: the files to commit (repository-relative).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"default": null
},
"dry_run": {
"description": "For `fixup` and `squash`: only list what would be committed (default true).",
"type": [
"boolean",
"null"
],
"default": null
},
"mode": {
"description": "For `reset`: soft, mixed (default), hard or keep.",
"type": [
"string",
"null"
],
"default": null
},
"name": {
"description": "For `new-branch` and `new-tag`: the name; for `push-up-to`: the remote branch (default:\nthe current branch's name).",
"type": [
"string",
"null"
],
"default": null
},
"message": {
"description": "For `edit-message`: the new message.",
"type": [
"string",
"null"
],
"default": null
}
}
}