Skip to main content
Glama

git_commit

Destructive

Commit staged changes with a supplied message while preserving normal repository hooks. Optionally amend the previous commit.

Instructions

Commit the current index with a supplied message and normal repository hooks.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message": "<message>"
    },
    "name": "git_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
amendNo
messageYes

Output Schema

NameRequiredDescriptionDefault
errorNo
changesYes
updatesNo
conflictsYes
operationYes
head_afterYes
head_beforeYes
process_idsYes
synchronization_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is covered. The description adds one genuinely useful fact beyond that — that normal repository hooks run — but says nothing about amend rewriting history, nor about what state the repository is left in on failure.

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?

A single front-loaded sentence that carries the verb, scope, required input, and hook behavior with no filler or redundancy.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and hooks are noted. However, for a destructive commit tool with zero schema coverage, the undocumented amend flag and missing staging prerequisite guidance leave meaningful gaps.

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, yet it only alludes to 'message' and never mentions the 'amend' parameter at all. That leaves a destructive history-rewriting flag completely undocumented in prose even though it appears in the schema as a bare boolean.

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 (commit) and resource (the current index) plus the required input (message) and a notable behavior (repository hooks). It is clearly distinct from git_stage and git_push without needing the schemas, though it does not name a sibling explicitly.

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?

There is no explicit when-to-use, when-not-to-use, or alternative guidance. The phrase 'current index' weakly implies that staging via git_stage must happen first, but prerequisites, and the relationship to git_continue/git_merge/git_rebase are left entirely to inference.

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