Skip to main content
Glama

Git Commit

git_commit

Commits staged changes using a provided commit message, adhering to Conventional Commits, with clear error feedback if nothing is staged.

Instructions

Commit the currently staged changes with the given message (the agent-authored Conventional Commit).

Fails with an actionable message if nothing is staged.

Args:

  • message (string): the full commit message (subject + optional body)

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { sha, shortStat }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesFull commit message
repo_pathNoPath to the git repository. Defaults to the server's working directory.
Behavior4/5

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

Annotations indicate not read-only, not destructive, not idempotent. The description adds that it commits staged changes, fails with an actionable message if nothing is staged, and returns JSON { sha, shortStat }. This goes beyond annotations by explaining failure mode and return format. No contradiction.

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 very concise, with a clear header, failure condition, an Args section, and return format. It uses bullet points for parameters and a simple structure. Every sentence adds value.

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

Completeness5/5

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

Given the simple tool (2 params, no output schema), the description covers the purpose, failure condition, default for optional param, and return type. It is complete enough for an agent to use correctly without additional context.

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

Parameters4/5

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

Schema covers 100% of parameters, but the description adds that the message should be a 'Conventional Commit' and that repo_path defaults to server CWD. This adds meaningful usage context beyond the schema definitions.

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

Purpose5/5

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

The description clearly specifies the action (commit) and resource (staged changes), and distinguishes from sibling tools like git_undo_last_commit or git_staged_diff by using the unique verb 'commit'. It also adds context about Conventional Commit format.

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

Usage Guidelines4/5

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

The description states a failure condition if nothing is staged, implying it should only be used when there are staged changes. However, it does not explicitly mention when to use alternatives like git_undo_last_commit or git_create_branch. The sibling list provides context but the description itself lacks explicit exclusions.

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/BenBen2109/ai-git-mcp'

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