Skip to main content
Glama

git_commit

Stage and commit repository changes, optionally for specific paths. Prevents commits on protected branches, ensuring you create a feature branch first.

Instructions

Stage and commit changes. By default every modified and untracked file is staged; pass paths to commit a subset. Refuses to commit on a protected branch — create a feature branch first. Write the message in the style of the repository's recent commits (check git_log).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoOnly stage and commit these paths. Default: all changes.
messageYesCommit message. First line is the subject; add a body after a blank line.
workspaceNoWorkspace alias. Defaults to the active workspace.
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses important behaviors: default staging of all modified/untracked files, refusal on protected branches, and the expectation that messages match repo style. While it does not mention return values or failure modes like empty commits, the provided behaviors are substantive and useful.

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?

Three concise sentences, each serving a distinct purpose: action and default behavior, safety condition and remedy, and style guidance. No unnecessary words, and the structure is front-loaded with the core action.

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

Completeness4/5

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

The description is compact but covers the primary action, default behavior, a restrictive condition, and a style directive. It complements the schema and sibling suggestions well. Missing details like whether the commit is pushed or how empty commits are handled are not critical for a standard git commit tool.

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 coverage is 100%, so baseline is 3. The description reinforces the `paths` parameter's behavior ('pass `paths` to commit a subset') and adds fresh guidance for `message` ('Write the message in the style of the repository's recent commits'), linking to git_log. This adds value beyond the schema.

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 opens with 'Stage and commit changes,' a specific verb+resource that clearly identifies a git commit operation. It distinguishes itself from sibling tools like git_status and git_log by focusing on the commit action and adding behavioral details like default staging and protected-branch refusal.

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?

It explicitly states when to use it for a subset of files ('pass `paths` to commit a subset') and gives a clear condition: 'Refuses to commit on a protected branch — create a feature branch first,' implicitly directing to git_branch. It also points to git_log for message style. However, it does not explicitly contrast with git_status or git_restore for reviewing or unstaging changes.

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/zcrossoverz/repo-bridge'

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