Skip to main content
Glama
martinsky999

MCP Git Server

by martinsky999

git_commit

Records changes to a Git repository by creating a commit with a descriptive message, enabling version control and tracking of modifications.

Instructions

Records changes to the repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
messageYes

Implementation Reference

  • The handler function implementing the git_commit tool logic using GitPython to commit staged changes.
    def git_commit(repo: git.Repo, message: str) -> str:
        commit = repo.index.commit(message)
        return f"Changes committed successfully with hash {commit.hexsha}"
  • Pydantic model for input schema of git_commit tool.
    class GitCommit(BaseModel):
        repo_path: str
        message: str
  • Tool registration in list_tools() defining name, description, and schema for git_commit.
    Tool(
        name=GitTools.COMMIT,
        description="Records changes to the repository",
        inputSchema=GitCommit.schema(),
    ),
  • Enum constant defining the tool name 'git_commit'.
    COMMIT = "git_commit"
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('Records changes') but doesn't disclose behavioral traits like whether it requires staged changes, what happens on success/failure, if it's destructive (overwrites history), authentication needs, or output format. This leaves significant gaps for a mutation tool.

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's appropriately sized and front-loaded, though its brevity contributes to gaps in other dimensions. Every word earns its place in conveying the core action.

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 complexity (a Git commit operation with 2 parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't cover parameter meanings, behavioral context, or usage guidelines, making it inadequate for effective tool selection and invocation.

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. It mentions 'changes to the repository' but doesn't explain the two parameters (repo_path and message) or their semantics (e.g., repo_path as directory path, message as commit description). No parameter details are provided beyond what's in the schema titles.

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

Purpose3/5

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

The description 'Records changes to the repository' states a general purpose (verb+resource) but is vague about what specific changes are recorded and how. It doesn't clearly distinguish this from sibling tools like git_add (which stages changes) or git_log (which shows commit history). The description is functional but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., staged changes via git_add), when not to use it, or how it relates to siblings like git_commit (for committing) versus git_diff (for viewing changes). The description offers no contextual usage information.

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