# git_commit

Record changes to the repository

Agent View of the PolicyLayer registry record for `git_commit`. HTML page: https://policylayer.com/tools/git/git-commit

## Facts

- Tool: `git_commit`
- Server: Git (`@modelcontextprotocol/server-git`) — https://policylayer.com/tools/git.md
- Install: `npx -y @modelcontextprotocol/server-git`
- Homepage: https://github.com/modelcontextprotocol/server-git
- Risk category: Write (Medium risk)
- Registry record: grade D, identity verified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "git_commit",
    "arguments": {}
  }
}
```

## Why git_commit is rated Medium

git_commit creates and modifies repository history by recording changes. This is a Write operation because it creates new data structures (commit objects) and modifies the repository state in a reversible way (commits can be amended or reverted). It is not Destructive because commits themselves cannot be undone without explicit revert/reset operations.

From the tool's own definition: "Tool name is 'git_commit' and description states 'Record changes to the repository'. The git commit command creates a permanent record of staged changes in the repository's history."

Risk signals: Creates permanent history entries

## Use case

AI agents use git_commit to create or update resources in Git, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Git environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Git:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "git_commit": {
      "limits": [
        {
          "counter": "git_commit_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Git (13)

- `git_checkout` — Execute — https://policylayer.com/tools/git/git-checkout.md
- `git_branch` — Read — https://policylayer.com/tools/git/git-branch.md
- `git_diff` — Read — https://policylayer.com/tools/git/git-diff.md
- `git_diff_staged` — Read — https://policylayer.com/tools/git/git-diff-staged.md
- `git_diff_unstaged` — Read — https://policylayer.com/tools/git/git-diff-unstaged.md
- `git_log` — Read — https://policylayer.com/tools/git/git-log.md
- `git_show` — Read — https://policylayer.com/tools/git/git-show.md
- `git_status` — Read — https://policylayer.com/tools/git/git-status.md
- `git_add` — Write — https://policylayer.com/tools/git/git-add.md
- `git_clone` — Write — https://policylayer.com/tools/git/git-clone.md
- `git_create_branch` — Write — https://policylayer.com/tools/git/git-create-branch.md
- `git_init` — Write — https://policylayer.com/tools/git/git-init.md
- `git_reset` — Write — https://policylayer.com/tools/git/git-reset.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=git · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/git
