Skip to main content
Glama
MCP Git Server

MCP Git Server

by mpfilbin

git_stash_pop

Apply a stashed change to restore it in the working tree and remove that entry from the stash list, with optional stash index and repository path.

Instructions

Apply stashed changes and remove them from stash list

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_stash_pop"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNoIndex of the stash to pop (defaults to most recent)
repoPathNoPath to git repository (defaults to current directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the key destructive trait that the entry is removed from the stash list, which is genuinely useful, but it says nothing about conflict handling (a failed pop typically leaves the entry in place) or the requirement for a working tree state in which the apply can succeed.

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?

A single front-loaded sentence with no filler; the mutate-and-drop consequence sits in the same clause. It is tight, though it could have traded a few words for the missing conflict caveat.

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

Completeness3/5

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

For a two-optional-parameter tool with fully documented schema and no output schema, the description is adequate but thin. The notable gap is failure semantics on conflict, which matters for a mutating git operation with zero annotation coverage.

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 both 'index' and 'repoPath' are already documented with defaults in the schema. The description adds no meaning beyond that, which is acceptable given the schema does the heavy lifting, but it forgoes an easy win on default-index behavior.

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

Purpose4/5

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

The description gives a specific verb pair ('apply', 'remove') and the resource ('stashed changes', 'stash list'), so the operation is unambiguous. It implicitly distinguishes itself from git_stash_list and git_stash by describing the apply-and-drop semantics, though it never names those siblings.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase 'apply stashed changes and remove them' tells an agent what the operation is for, but there is no explicit when-to-use, when-not-to-use, or alternative named. An agent must infer that this is the choice over git_stash_list when it actually wants to restore work.

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