Skip to main content
Glama
martinsky999

MCP Git Server

by martinsky999

git_reset

Unstage all staged changes in a Git repository to revert them to the working directory, allowing you to modify or discard changes before committing.

Instructions

Unstages all staged changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Implementation Reference

  • The core handler function that executes the git_reset tool logic: resets the Git index to unstage all changes.
    def git_reset(repo: git.Repo) -> str:
        repo.index.reset()
        return "All staged changes reset"
  • Pydantic BaseModel defining the input schema for the git_reset tool, requiring repo_path.
    class GitReset(BaseModel):
        repo_path: str
  • Registration of the 'git_reset' tool (name from GitTools.RESET) in the list_tools() method with description and input schema.
    Tool(
        name=GitTools.RESET,
        description="Unstages all staged changes",
        inputSchema=GitReset.schema(),
    ),
  • Enum definition in GitTools where RESET is set to the tool name 'git_reset'.
    RESET = "git_reset"
  • Invocation of git_reset handler within the main call_tool dispatcher.
    case GitTools.RESET:
        result = git_reset(repo)
        return [TextContent(
            type="text",
            text=result
        )]
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('unstages all staged changes') but doesn't describe whether this is destructive (it is, as it removes staging), what happens to the changes (they become unstaged but remain in the working directory), or any side effects. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for the tool's function, avoiding unnecessary elaboration. Every word earns its place, making it highly concise and well-structured.

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?

Given the tool's complexity (a mutation operation), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't cover behavioral aspects like destructiveness, parameter semantics, or output expectations. For a Git reset tool, which can have significant effects, this description is inadequate and leaves critical gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. The description mentions no parameters, while the input schema has one required parameter ('repo_path'). This adds no meaning beyond what the schema provides, failing to explain what 'repo_path' represents (e.g., path to the Git repository). The description does not compensate for the low coverage.

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 'Unstages all staged changes' clearly states the tool's function with a specific verb ('unstages') and resource ('staged changes'). It distinguishes from siblings like git_add (which stages changes) and git_commit (which commits staged changes), though it doesn't explicitly name alternatives. The purpose is unambiguous but could be slightly more specific about scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing staged changes), exclusions, or compare it to siblings like git_checkout (which can also undo changes) or git_diff_staged (which shows staged changes). Usage is implied from the purpose but not explicitly stated.

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/martinsky999/mcp-git-py'

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