Skip to main content
Glama
ShadowGit MCP Server

ShadowGit MCP Server

End a ShadowGit session

end_session
Idempotent

Ends a project's active ShadowGit session to resume automatic snapshots and capture changes not saved with checkpoint.

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).

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": "end_session"
  }
}

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.1/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, idempotent. The description adds genuinely new behavioral detail beyond them: the side effect of resuming automatic snapshots, the no-op success path, and what happens to un-checkpointed changes, including a version-dependent caveat. It doesn't mention permissions or failure modes, which keeps it from a 5.

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?

Three sentences, each carrying a distinct fact: purpose, default/no-op behavior, and the unsaved-changes snapshot rule. Front-loaded with the outcome, though the version caveat makes the last sentence dense.

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 no explanation, and annotations carry the safety profile. Given the low complexity (2 optional params), the description covers the decisions an agent must make; only error/permission behavior is unaddressed.

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 coverage is 100% and both parameters are already documented, including session_id defaulting to the active session. The description restates that default in prose without adding format, constraints, or examples, so it meets the baseline but doesn't exceed the schema.

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 ('ending its active ShadowGit session') plus the user-facing effect ('Resume automatic snapshots for a project'). That framing clearly separates it from start_session and checkpoint in the sibling list.

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: session_id is optional, the tool targets the active session by default, and it is a no-op success when nothing is active. It also implicitly distinguishes itself from `checkpoint` by noting changes not saved with checkpoint. It stops short of an explicit 'use checkpoint before this if you want a named checkpoint' recommendation.

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