Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Git Stage & Commit

git_commit

Stage specified files or all changes and create a Git commit with your message, letting you record work from an AI agent without manual terminal commands.

Instructions

暂存指定文件或全部更改并提交 Git Commit。

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
filesNo仅暂存指定文件列表(设置后忽略 addAll)
addAllNo是否自动 git add -A 暂存全部改动
messageYesCommit 提交说明
repoPathNoGit 仓库路径

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden for a mutating, history-altering operation. It does not disclose that a commit permanently writes to repository history, whether hooks run, what happens when there is nothing to stage, or how failures are reported — all of which an agent needs before invoking a commit.

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

Conciseness4/5

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

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity is partly under-specification rather than disciplined concision.

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?

For a mutation tool with no annotations and no output schema, the definition is thin: it omits commit semantics, failure modes and the relationship to staging tools. An agent could call it, but not confidently predict its effects or error behavior.

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?

Schema description coverage is 100%, so all four parameters are already documented in the schema, including the files/addAll interaction. The description only restates the file-or-all distinction, adding no format, ordering or edge-case detail beyond the structured fields; baseline 3 applies.

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 names a specific compound action (stage files or all changes, then commit) on a specific resource (Git commit), so an agent knows exactly what the tool does. It does not name or contrast itself with siblings such as git_status, git_diff or git_sync, so the distinction is left to the agent.

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 guidance, no statement of prerequisites (repository must exist, changes must be present), and no mention of alternatives or when not to use it. The staging-plus-commit workflow is only weakly implied by the verb sequence.

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