Skip to main content
Glama
ShadowGit MCP Server

ShadowGit MCP Server

Save a ShadowGit snapshot

checkpoint

Save current project changes as a titled ShadowGit snapshot, respect .shadowgit-ignore, check added links against project rules, and return the snapshot hash without touching project git.

Instructions

Save the project's current changes to ShadowGit history as one saved snapshot with a title, following the project's .shadowgit-ignore. Works inside or outside a session and never touches the project's own git. Returns the snapshot's hash. When the project has rules, in its .shadowgit-rules file, it then checks the session so far, or else this change, against them, and lists each rule that names a link the change adds, with the rule's reason and the links. Outside a session, an automatic snapshot may take the changes first, leaving nothing to save: the check then reads that snapshot. These are the project's own rules, written by the user or the project's authors: take each such link out and save again, or tell the user why it is there, quoting the rule that names it. A check still running names its change for get_lens. Needs the ShadowGit app running.

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": {
      "title": "<title>"
    },
    "name": "checkpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoProject name or absolute path. Defaults to the current project.
titleYesOne line saying what changed, e.g. "Fix login redirect loop"
messageNoOptional details: why, and anything a reviewer should know

Output Schema

NameRequiredDescriptionDefault
repoYes
rulesNoThe change checked against the project's rules; absent for a project without them
titleYes
commitYes
files_changedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.9.0
    • changedOutput schema / properties / rules / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "check": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "file": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "added": {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "removed": {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  }
      -                },
      -                "required": [
      -                  "added",
      -                  "removed"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "The rules the range adds to and removes from .shadowgit-rules; null when it leaves the file alone"
      -          },
      -          "matches": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "count": {
      -                  "description": "How many links the range adds that the rule names",
      -                  "maximum": 9007199254740991,
      -                  "minimum": -9007199254740991,
      -                  "type": "integer"
      -                },
      -                "links": {
      -                  "description": "The first links, in words; count has them all",
      -                  "items": {
      -                    "type": "string"
      -                  },
      -                  "type": "array"
      -                },
      -                "rule": {
      -                  "additionalProperties": false,
      -                  "properties": {
      -                    "because": {
      -                      "description": "Its reason, as written after \"because\"",
      -                      "type": [
      -                        "string",
      -                        "null"
      -                      ]
      -                    },
      -                    "form": {
      -                      "description": "never, only or nothing",
      -                      "type": "string"
      -                    },
      -                    "from": {
      -                      "description": "The names on its first side; none for a nothing-rule",
      -                      "items": {
      -                        "type": "string"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "line": {
      -                      "maximum": 9007199254740991,
      -                      "minimum": -9007199254740991,
      -                      "type": "integer"
      -                    },
      -                    "text": {
      -                      "description": "The rule as written, without its reason",
      -                      "type": "string"
      -                    },
      -                    "to": {
      -                      "items": {
      -                        "type": "string"
      -                      },
      -                      "type": "array"
      -                    }
      -                  },
      -                  "required": [
      -                    "line",
      -                    "text",
      -                    "form",
      -                    "from",
      -                    "to",
      -                    "because"
      -                  ],
      -                  "type": "object"
      -                },
      -                "steps": {
      -                  "description": "The ids of the steps that hold them",
      -                  "items": {
      -                    "type": "string"
      -                  },
      -                  "type": "array"
      -                }
      -              },
      -              "required": [
      -                "rule",
      -                "count",
      -                "links",
      -                "steps"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "rules": {
      -            "description": "How many rules it was checked against",
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "rules",
      -          "matches",
      -          "file"
      -        ],
      -        "type": "object"
      -      },
      -      "range": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "base": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "head": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "base",
      -          "head"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "checked",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "range",
      -      "check"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "range": {
      -        "additionalProperties": false,
      -        "description": "Read its check with get_lens, passing this base and head",
      -        "properties": {
      -          "base": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "head": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "base",
      -          "head"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "running",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "range"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "type": "string"
      -      },
      -      "range": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "base": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "head": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "base",
      -              "head"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "status": {
      -        "const": "failed",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "range",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "check": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "file": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "added": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "removed": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "required": [
      +                  "added",
      +                  "removed"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The rules the change adds to and removes from .shadowgit-rules; null when it leaves the file alone"
      +          },
      +          "matches": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "count": {
      +                  "description": "How many links the change adds that the rule names",
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                "links": {
      +                  "description": "The first links, in words; count has them all",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "rule": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "because": {
      +                      "description": "Its reason, as written after \"because\"",
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "form": {
      +                      "description": "never, only or nothing",
      +                      "type": "string"
      +                    },
      +                    "from": {
      +                      "description": "The names on its first side; none for a nothing-rule",
      +                      "items": {
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "line": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": -9007199254740991,
      +                      "type": "integer"
      +                    },
      +                    "text": {
      +                      "description": "The rule as written, without its reason",
      +                      "type": "string"
      +                    },
      +                    "to": {
      +                      "items": {
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    }
      +                  },
      +                  "required": [
      +                    "line",
      +                    "text",
      +                    "form",
      +                    "from",
      +                    "to",
      +                    "because"
      +                  ],
      +                  "type": "object"
      +                },
      +                "steps": {
      +                  "description": "The ids of the steps that hold them",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "rule",
      +                "count",
      +                "links",
      +                "steps"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "rules": {
      +            "description": "How many rules it was checked against",
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "rules",
      +          "matches",
      +          "file"
      +        ],
      +        "type": "object"
      +      },
      +      "range": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "base": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "head": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "base",
      +          "head"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "checked",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "range",
      +      "check"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "range": {
      +        "additionalProperties": false,
      +        "description": "Read its check with get_lens, passing this base and head",
      +        "properties": {
      +          "base": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "head": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "base",
      +          "head"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "running",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "range"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      },
      +      "range": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "base": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "head": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "base",
      +              "head"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "status": {
      +        "const": "failed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "range",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changedv2.5.0
    • addedOutput schema / properties / rules
      Added value: +{
      +  "description": "The change checked against the project's rules; absent for a project without them",
      +  "oneOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "check": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "file": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "added": {
      +                      "items": {
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "removed": {
      +                      "items": {
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    }
      +                  },
      +                  "required": [
      +                    "added",
      +                    "removed"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The rules the range adds to and removes from .shadowgit-rules; null when it leaves the file alone"
      +            },
      +            "matches": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "count": {
      +                    "description": "How many links the range adds that the rule names",
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  "links": {
      +                    "description": "The first links, in words; count has them all",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "rule": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "because": {
      +                        "description": "Its reason, as written after \"because\"",
      +                        "type": [
      +                          "string",
      +                          "null"
      +                        ]
      +                      },
      +                      "form": {
      +                        "description": "never, only or nothing",
      +                        "type": "string"
      +                      },
      +                      "from": {
      +                        "description": "The names on its first side; none for a nothing-rule",
      +                        "items": {
      +                          "type": "string"
      +                        },
      +                        "type": "array"
      +                      },
      +                      "line": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": -9007199254740991,
      +                        "type": "integer"
      +                      },
      +                      "text": {
      +                        "description": "The rule as written, without its reason",
      +                        "type": "string"
      +                      },
      +                      "to": {
      +                        "items": {
      +                          "type": "string"
      +                        },
      +                        "type": "array"
      +                      }
      +                    },
      +                    "required": [
      +                      "line",
      +                      "text",
      +                      "form",
      +                      "from",
      +                      "to",
      +                      "because"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "steps": {
      +                    "description": "The ids of the steps that hold them",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "required": [
      +                  "rule",
      +                  "count",
      +                  "links",
      +                  "steps"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "rules": {
      +              "description": "How many rules it was checked against",
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "rules",
      +            "matches",
      +            "file"
      +          ],
      +          "type": "object"
      +        },
      +        "range": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "base": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "head": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "base",
      +            "head"
      +          ],
      +          "type": "object"
      +        },
      +        "status": {
      +          "const": "checked",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "range",
      +        "check"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "range": {
      +          "additionalProperties": false,
      +          "description": "Read its check with get_lens, passing this base and head",
      +          "properties": {
      +            "base": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "head": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "base",
      +            "head"
      +          ],
      +          "type": "object"
      +        },
      +        "status": {
      +          "const": "running",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "range"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "error": {
      +          "type": "string"
      +        },
      +        "range": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "base": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "head": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "base",
      +                "head"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "status": {
      +          "const": "failed",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "range",
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ]
      +}
  3. Changed11 schema fields changedv2.1.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / author
      Removed value: -{
      -  "description": "Author name (e.g., \"Claude\", \"GPT-4\"). Defaults to \"AI Assistant\"",
      -  "type": "string"
      -}
    • changedInput schema / properties / message / description
      Previous value: -"Detailed commit message (optional, max 1000 chars)"New value: +"Optional details: why, and anything a reviewer should know"
    • addedInput schema / properties / message / maxLength
      Added value: +1000
    • changedInput schema / properties / repo / description
      Previous value: -"Repository name"New value: +"Project name or absolute path. Defaults to the current project."
    • addedInput schema / properties / repo / minLength
      Added value: +1
    • changedInput schema / properties / title / description
      Previous value: -"Commit title (max 50 chars) - REQUIRED. Be specific about what was changed."New value: +"One line saying what changed, e.g. \"Fix login redirect loop\""
    • addedInput schema / properties / title / maxLength
      Added value: +72
    • addedInput schema / properties / title / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "repo",
      -  "title"
      -]New value: +[
      +  "title"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "commit": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "files_changed": {
      +      "type": "number"
      +    },
      +    "repo": {
      +      "type": "string"
      +    },
      +    "title": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "commit",
      +    "title",
      +    "files_changed",
      +    "repo"
      +  ],
      +  "type": "object"
      +}
  4. Addedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations: honors .shadowgit-ignore, returns the snapshot hash, may auto-snapshot outside a session so the save finds nothing, runs rule checks and reports offending links with reasons, and requires the ShadowGit app to be running. These are exactly the side effects and prerequisites the mutation hints do not convey.

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

Conciseness3/5

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

The purpose and return value are front-loaded, which is good, but the middle section about .shadowgit-rules is a run-on with awkward phrasing ('These are the project's own rules, written by the user or the project's authors') that an agent has to re-read. Several clauses repeat the snapshot/check interaction.

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?

An output schema exists, so return values need less explanation, yet the description still covers the hash, ignore-file behavior, session vs. non-session paths, and the app-running prerequisite — enough to call this correctly. Only the rule-check semantics remain wordy rather than missing.

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

Parameters3/5

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

Schema description coverage is 100%, so repo/title/message are already documented with lengths and examples. The description reinforces the title concept ('one saved snapshot with a title') but adds no format or constraint details beyond the schema, so the baseline 3 applies.

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 and resource: 'Save the project's current changes to ShadowGit history as one saved snapshot with a title.' It also distinguishes itself from the project's own git ('never touches the project's own git'), which routes the agent away from git_command, and names get_lens for the in-flight check case.

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?

Gives clear operating context ('Works inside or outside a session') and prescriptive next steps when a project rule is violated ('take each such link out and save again, or tell the user why it is there'). It names get_lens as the alternative for a still-running check, but never states when *not* to checkpoint (e.g., vs. end_session) explicitly.

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