Skip to main content
Glama

git_snapshot

Destructive

Creates a vault-scoped Git checkpoint: run a dry-run to inspect changes, validation, and risk, then confirm with expectedHead to commit only vault paths without pushing.

Instructions

Commit a local, vault-scoped Git checkpoint. Dry-run returns expectedHead, files, validation, risk and previewReady/canConfirm/wouldChange/blockedReasons; confirm:true with that expectedHead commits only the vault pathspec 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

NameRequiredDescriptionDefault
confirmNoTrue only after reviewing the dry-run.
messageNoOptional one-line commit subject; generated when omitted.
expectedHeadNoRequired with confirm:true: the expectedHead of the preceding dry-run.

Output Schema

NameRequiredDescriptionDefault
okYes
headNo
riskNo
filesNo
branchNo
countsNo
dryRunYes
reasonNo
subjectNo
repoRootYes
committedYes
operationYes
vaultRootYes
canConfirmYesTrue only when repeating the call with confirm:true can perform the previewed change without another explicit safety opt-in.
commitHashNo
pushReasonNo
validationNo
wouldChangeYes
detachedHeadNo
expectedHeadNo
previewReadyYes
previousHeadNo
commitSummaryNo
pushSupportedNo
vaultPathspecNo
blockedReasonsYes
stagedOutsideVaultNo
operationInProgressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed37 schema fields changedv2.7.5
    • changedInput schema / properties / confirm / description
      Previous value: -"Default false. Set true only after reviewing the dry-run preview and its risk/validation fields."New value: +"True only after reviewing the dry-run."
    • changedInput schema / properties / expectedHead / description
      Previous value: -"Required with confirm:true. Copy the exact expectedHead returned by the immediately preceding dry-run; this prevents committing after a concurrent HEAD change."New value: +"Required with confirm:true: the expectedHead of the preceding dry-run."
    • removedInput schema / properties / expectedHead / minLength
      Removed value: -1
    • removedInput schema / properties / expectedHead / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • changedInput schema / properties / message / description
      Previous value: -"Optional local commit subject, one line and at most 200 characters. A deterministic ontology snapshot subject is generated when omitted."New value: +"Optional one-line commit subject; generated when omitted."
    • removedOutput schema / properties / blockedReasons / description
      Removed value: -"Machine-readable human explanations for every condition currently blocking confirmation."
    • removedOutput schema / properties / blockedReasons / items
      Removed value: -{
      -  "minLength": 1,
      -  "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      -  "type": "string"
      -}
    • removedOutput schema / properties / commitHash / minLength
      Removed value: -1
    • removedOutput schema / properties / commitHash / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / counts / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / counts / properties
      Removed value: -{
      -  "outsideVault": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "staged": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "stagedOutsideVault": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "total": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "unstaged": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "untracked": {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / counts / required
      Removed value: -[
      -  "total",
      -  "staged",
      -  "unstaged",
      -  "untracked",
      -  "outsideVault",
      -  "stagedOutsideVault"
      -]
    • removedOutput schema / properties / files / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "index": {
      -      "maxLength": 1,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "path": {
      -      "minLength": 1,
      -      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      -      "type": "string"
      -    },
      -    "staged": {
      -      "type": "boolean"
      -    },
      -    "status": {
      -      "enum": [
      -        "untracked",
      -        "added",
      -        "modified",
      -        "deleted"
      -      ],
      -      "type": "string"
      -    },
      -    "unstaged": {
      -      "type": "boolean"
      -    },
      -    "worktree": {
      -      "maxLength": 1,
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "path",
      -    "index",
      -    "worktree",
      -    "status",
      -    "staged",
      -    "unstaged"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / operation / enum
      Removed value: -[
      -  "git_status",
      -  "git_snapshot"
      -]
    • removedOutput schema / properties / previewReady / description
      Removed value: -"True only when this response is a complete dry-run preview that an agent can review."
    • removedOutput schema / properties / previousHead / minLength
      Removed value: -1
    • removedOutput schema / properties / previousHead / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / pushReason / minLength
      Removed value: -1
    • removedOutput schema / properties / pushReason / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / reason / minLength
      Removed value: -1
    • removedOutput schema / properties / reason / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / repoRoot / minLength
      Removed value: -1
    • removedOutput schema / properties / repoRoot / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / risk / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / risk / properties
      Removed value: -{
      -  "level": {
      -    "enum": [
      -      "low",
      -      "medium",
      -      "high"
      -    ],
      -    "type": "string"
      -  },
      -  "warnings": {
      -    "items": {
      -      "minLength": 1,
      -      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      -      "type": "string"
      -    },
      -    "type": "array"
      -  }
      -}
    • removedOutput schema / properties / risk / required
      Removed value: -[
      -  "level",
      -  "warnings"
      -]
    • removedOutput schema / properties / stagedOutsideVault / items
      Removed value: -{
      -  "minLength": 1,
      -  "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      -  "type": "string"
      -}
    • removedOutput schema / properties / subject / minLength
      Removed value: -1
    • removedOutput schema / properties / subject / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / validation / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / validation / properties
      Removed value: -{
      -  "errorFiles": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "pathDrifts": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "problemFiles": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "scanned": {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "warningFiles": {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / validation / required
      Removed value: -[
      -  "scanned",
      -  "problemFiles",
      -  "errorFiles",
      -  "warningFiles",
      -  "pathDrifts"
      -]
    • removedOutput schema / properties / vaultPathspec / minLength
      Removed value: -1
    • removedOutput schema / properties / vaultPathspec / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / vaultRoot / minLength
      Removed value: -1
    • removedOutput schema / properties / vaultRoot / pattern
      Removed value: -"^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$"
    • removedOutput schema / properties / wouldChange / description
      Removed value: -"True only when the dry-run predicts a disk or Git change."
  2. First observedv0.13.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and openWorldHint=false, but the description adds substantial context beyond them: the operation is local-only, never pushes, commits only the vault pathspec, and is gated by an expectedHead consistency check. It also enumerates the dry-run preview fields, which tells the agent exactly what safety information is available before a destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, front-loaded with the action and scope, then the dry-run/confirm protocol. The parenthetical field list is compact and no sentence is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value documentation is unnecessary, and annotations carry the safety profile; the description fills the remaining gap with the dry-run/confirm protocol and commit scope. It stops short of describing what happens on an expectedHead mismatch beyond the blockedReasons field name, a minor omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns more by explaining the relational semantics the schema only hints at — that expectedHead must come from the preceding dry-run and is paired with confirm:true. Message and confirm semantics remain schema-driven.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (commit) with an explicit scope (local, vault-scoped Git checkpoint) and explicitly rules out an adjacent operation ("never pushes"), which separates it from the read-only git_history/git_status siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lays out the two-phase workflow: call without confirm for a dry-run, then call with confirm:true plus the expectedHead from that dry-run. It does not name any alternative tool or state when not to use this one, but the when-to-use path is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.