git_snapshot
Create a local, vault-scoped Git checkpoint. Preview the exact changes and risks in a dry-run, then confirm with the provided expected head to commit safely without touching outside files.
Instructions
Create a local, vault-scoped Git checkpoint. Dry-run by default and returns exact expectedHead, files, validation, risk, and the shared previewReady/canConfirm/wouldChange/blockedReasons safety contract. confirm:true requires that expectedHead, blocks validator errors and Git operations in progress, commits only the vault pathspec, leaves outside files untouched, and never pushes.
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_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Default false. Set true only after reviewing the dry-run preview and its risk/validation fields. | |
| message | No | Optional local commit subject, one line and at most 200 characters. A deterministic ontology snapshot subject is generated when omitted. | |
| expectedHead | No | Required with confirm:true. Copy the exact expectedHead returned by the immediately preceding dry-run; this prevents committing after a concurrent HEAD change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| head | No | ||
| risk | No | ||
| files | No | ||
| branch | No | ||
| counts | No | ||
| dryRun | Yes | ||
| reason | No | ||
| subject | No | ||
| repoRoot | Yes | ||
| committed | Yes | ||
| operation | Yes | ||
| vaultRoot | Yes | ||
| canConfirm | Yes | True only when repeating the call with confirm:true can perform the previewed change without another explicit safety opt-in. | |
| commitHash | No | ||
| pushReason | No | ||
| validation | No | ||
| wouldChange | Yes | True only when the dry-run predicts a disk or Git change. | |
| detachedHead | No | ||
| expectedHead | No | ||
| previewReady | Yes | True only when this response is a complete dry-run preview that an agent can review. | |
| previousHead | No | ||
| commitSummary | No | ||
| pushSupported | No | ||
| vaultPathspec | No | ||
| blockedReasons | Yes | Machine-readable human explanations for every condition currently blocking confirmation. | |
| stagedOutsideVault | No | ||
| operationInProgress | No |