Skip to main content
Glama
MCP Git Server

MCP Git Server

by mpfilbin

git_reset

Unstage specific files or reset the current HEAD to a chosen commit using soft, mixed, or hard modes to keep or discard changes.

Instructions

Unstage files or reset current HEAD to specified state

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

Input Schema

NameRequiredDescriptionDefault
modeNoReset mode: soft (keep changes staged), mixed (keep changes unstaged), hard (discard changes)
filesNoSpecific files to unstage (if not provided, resets to commit)
commitNoCommit hash or reference to reset to (defaults to HEAD)
repoPathNoPath to git repository (defaults to current directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With annotations empty, the description carries the full behavioral burden, yet it never discloses that hard mode discards uncommitted work or that reset can rewrite the index/working tree. The only warning about discarding changes exists in the schema's mode enum, not in the description. For a potentially destructive git operation, this is a significant omission.

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 covering both capabilities with no wasted words. It is efficient but slightly compresses two distinct operations into one clause, which contributes to the ambiguity about which parameter combination selects which behavior.

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

Completeness2/5

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

For a four-parameter git tool with destructive modes, no annotations, and no output schema, the description is too thin. It omits the critical behavioral difference between soft/mixed/hard resets and the risk of data loss, which an agent needs before invoking it.

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 every parameter is already documented, including the mode enum meanings and the files/commit defaults. The description adds no additional meaning beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb and resource: 'Unstage files or reset current HEAD to specified state.' An agent can tell this covers both index unstaging and commit resets. However, it doesn't distinguish itself from close siblings like git_restore, which also unstages/restores files, so the boundary is left to inference.

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?

The two clauses imply two usage contexts (unstaging files vs resetting HEAD), but there is no explicit guidance on when to choose this over git_restore, git_checkout, or git_stash. No exclusions or prerequisites are stated, leaving the agent to infer the correct alternative from the sibling names alone.

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