Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_stash

Destructive

Manage git stashes to set aside uncommitted work before switching branches and restore it later. Supports list, push, pop, and drop operations.

Instructions

Manage stashes: list, push changes, or pop and drop existing stashes. Use this to set aside uncommitted work before switching branches, or to restore previously stashed work. Does NOT discard changes permanently — push preserves them for later; only drop, which requires confirmed=True, removes a stash, and push needs modified tracked files. Best for: setting aside work-in-progress to switch context. Returns: stash listing, or git stash output. Use git_checkout after stashing to switch branches; use git_reset to discard changes instead of preserving them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoStash message
confirmedNoExplicit confirmation for stash drop
operationNoOne of: list, push, pop, droplist
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
stash_refNoStash reference like 'stash@{0}'
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses that only drop removes a stash and requires confirmed=True, push preserves changes and needs modified tracked files, and pop restores work. This clarifies exactly which operations are destructive and what conditions apply.

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 front-loaded with the core purpose and operation list. It is slightly redundant ('Best for' repeats the earlier use case), but each sentence contributes useful information about behavior, prerequisites, returns, and related tools, making it tight overall.

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?

Without an output schema, the description still communicates the return type ('stash listing, or git stash output'), all supported operations, prerequisites for each, and related tool usage. It provides sufficient context for an agent to safely and correctly invoke the tool across its operations.

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?

The input schema already covers all 5 parameters with descriptions, so the baseline is 3. The description adds extra operational constraints not present in the schema, such as drop requiring confirmed=True and push needing modified tracked files, which enriches parameter understanding.

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 specifies it manages stashes with operations list, push, pop, and drop, which is a concrete verb+resource. It also distinguishes from related tools by explicitly referencing git_checkout and git_reset for switching branches or discarding changes, avoiding confusion with siblings.

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

Usage Guidelines5/5

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

It explicitly says 'Use this to set aside uncommitted work before switching branches, or to restore previously stashed work.' It further provides alternatives: 'Use git_checkout after stashing to switch branches; use git_reset to discard changes instead of preserving them,' giving clear when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jesspig/git-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server