Skip to main content
Glama
alessandro-afloarei

ShadowGit MCP Server

End a ShadowGit session

end_session
Idempotent

Ends an active ShadowGit session to resume automatic snapshots and capture unsaved changes at session end; safely succeeds if no session is active.

Instructions

Resume automatic snapshots for a project by ending its active ShadowGit session. Without session_id it ends whatever session is active on the project, and succeeds with nothing to do if there is none. ShadowGit takes changes not saved with checkpoint into a snapshot as the session ends (before ShadowGit 0.3.13, the next automatic snapshot takes them).

Input Schema

NameRequiredDescriptionDefault
repoNoProject name or absolute path. Defaults to the current project.
session_idNoDefaults to the active session of the project

Output Schema

NameRequiredDescriptionDefault
nextNoThe step that follows a session
repoYes
endedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • addedOutput schema / properties / next
      Added value: +{
      +  "description": "The step that follows a session",
      +  "type": "string"
      +}
  2. Changed7 schema fields changedv2.1.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / commitHash
      Removed value: -{
      -  "description": "Commit hash from checkpoint (optional)",
      -  "type": "string"
      -}
    • addedInput schema / properties / repo
      Added value: +{
      +  "description": "Project name or absolute path. Defaults to the current project.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / sessionId
      Removed value: -{
      -  "description": "Session ID from start_session",
      -  "type": "string"
      -}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Defaults to the active session of the project",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "sessionId"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "ended": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "repo": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "ended",
      +    "repo"
      +  ],
      +  "type": "object"
      +}
  3. Addedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important side effects: unsaved changes are captured into a snapshot when the session ends, with a version-specific fallback before 0.3.13. It also confirms the no-session success behavior, which complements the idempotentHint and destructiveHint annotations without contradicting them.

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

Conciseness4/5

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

The description is appropriately sized and front-loads the main purpose before covering default behavior and snapshot semantics. The version-specific parenthetical is useful but slightly niche, keeping it just below maximally concise.

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

Completeness5/5

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

The definition covers the purpose, default behavior, no-op outcome, and snapshot side effect, while annotations and the output schema handle safety and return-value details. An agent has enough information to decide whether and how to call it.

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 both parameters are already documented in the schema. The description adds meaning for session_id by explaining the default behavior when it is omitted and the no-op outcome when there is no active session.

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?

The description states a specific verb and resource: ending an active ShadowGit session for a project in order to resume automatic snapshots. It clearly distinguishes the operation from start_session and from checkpoint-related behavior by explaining what happens as the session ends.

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 gives clear usage context, including that omitting session_id ends whichever session is active and that the call succeeds as a no-op when no session exists. It does not explicitly name start_session or checkpoint as alternatives or exclusions, but the operational context is clear.

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