Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_revert

Destructive

Revert a commit by creating a new commit that undoes it, safely fixing published changes without rewriting history. Optionally apply changes without committing.

Instructions

Revert a commit by creating a new commit that undoes it, or apply the undo without committing (no_commit=True). Use this to safely undo a published commit without rewriting history, when other people may already have the commit. Does NOT move HEAD backwards or discard history — use git_reset for that; use git_cherry_pick to re-apply a commit instead of undoing it. Best for: safely undoing a published commit without rewriting history. Returns: confirmation with the new revert commit hash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitYesCommit to revert
no_commitNoApply changes without committing
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
Behavior4/5

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

The description adds meaningful context beyond the annotations: it clarifies that this operation does NOT move HEAD backwards or discard history, and explains the no_commit behavior. While destructiveHint=true is present, the description aligns with it by noting the safe nature (new commit) and explicitly what it doesn't do. It does not disclose conflict potential or prerequisites, but given annotations heavily cover the safety profile, this is credible.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, followed by usage guidance, alternatives, best-for, and return value, all in five concise sentences. No redundant or filler language; each sentence contributes value.

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?

For a tool of moderate complexity with no output schema, the description covers what, when, and the return value. It does not mention potential issues like merge conflicts or working tree states, but it includes enough context for an agent to select and invoke the tool correctly, especially with sibling alternatives clearly distinguished.

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?

The input schema already has 100% coverage with descriptive parameter descriptions, so the baseline is 3. The description adds a small amount of context by referring to no_commit=True in context, but it does not enrich the parameter meanings beyond what the schema provides.

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 opens with 'Revert a commit by creating a new commit that undoes it,' which precisely states the tool's function and unique mechanism. It also explicitly contrasts with git_reset and git_cherry_pick, clearly distinguishing it from sibling tools.

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 provides explicit guidance: 'Use this to safely undo a published commit without rewriting history, when other people may already have the commit.' It also states when NOT to use it, naming alternatives ('use git_reset for that; use git_cherry_pick to re-apply a commit instead of undoing it'), fulfilling the highest bar for usage 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