git_line_change
MCP tools › Version control
One change (gutter marker) of a workspace file against HEAD. Without action: the file's changes with kind, new and old ranges (1-based, inclusive) and HEAD text. line picks the change containing it (a deletion: the line below). action rollback reverts it on disk; commit with message commits only this change (hooks run). Dry run by default: returns the change and resulting text; dry_run=false needs the vcs-write right. Open files are taken as the editor shows them; rollback is one undo step.
Its results carry text from git, files: the client is told to treat that as data, never as instructions.
| Capability | git.git_line_change |
|---|---|
| Area | Version control |
| Access | changes files, repository |
| Reaches | process |
| Rights | vcs-write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path. |
line | integer | A 1-based line of the change to act on (a deletion: the line below it).minimum 0 |
action | string | rollback (take the change back in the file) or commit (commit only this change);
without it the file's changes are listed. |
message | string | Commit message, for commit. |
dry_run | boolean | Default true: only say what would happen. |
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_line_change '{"path":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "path" ], "properties": { "path": { "description": "Workspace-relative file path.", "type": "string" }, "line": { "description": "A 1-based line of the change to act on (a deletion: the line below it).", "type": [ "integer", "null" ], "minimum": 0 }, "action": { "description": "`rollback` (take the change back in the file) or `commit` (commit only this change);\nwithout it the file's changes are listed.", "type": [ "string", "null" ] }, "message": { "description": "Commit message, for `commit`.", "type": [ "string", "null" ] }, "dry_run": { "description": "Default true: only say what would happen.", "type": [ "boolean", "null" ] } }}