Revert Commit
revertCommitUndo one commit as a new commit. sha is the commit any write result returned (createLedgerFiles, appendLedgerText, addLedgerEntries, …), or main for the latest. Each file it touched goes back to its parent's contents in one atomic commit; CONFLICT if a later commit changed any of them. Pinned credentials can omit ledger. dry_run previews without committing.
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": {
"sha": "<sha>"
},
"name": "revertCommit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | Yes | The commit to undo: a sha that a write result returned or the commits read lists, or a branch name for its latest commit. | |
| dryRun | No | Alias of dry_run, as REST and GraphQL spell it. | |
| ledger | No | Ledger as owner/name; see the server instructions. | |
| dry_run | No | Run every check and return the preview without committing | |
| message | No | The revert commit's message; defaults to `Revert "<subject>"` and the sha it reverts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| result | No |