Skip to main content
Glama
kmandana
by kmandana

commit_changes

Execute a git commit after the user reviews and approves the generated commit message.

Instructions

Execute git commit with a user-approved commit message.

CRITICAL WORKFLOW - YOU MUST FOLLOW THESE STEPS IN ORDER:

  1. Call get_commit_context to get the diff

  2. Generate a commit message based on the actual diff

  3. SHOW the generated commit message to the user in your response

  4. ASK the user: "Should I proceed with this commit?" and WAIT for their response

  5. ONLY call this tool AFTER the user explicitly approves (says "yes", "proceed", "commit it", etc.)

  6. Set user_approved=True when calling this tool

DO NOT call this tool in the same response where you generate the commit message. The user MUST see the message and approve it first.

Args: message: User-approved commit message (should follow 50/72 rule) user_approved: REQUIRED - Must be True. Confirms user has seen and approved the commit message. repo_path: Path to git repository (optional, defaults to Claude's working directory)

Returns: Success message with commit hash or error

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
repo_pathNo
user_approvedYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fully explains the requirement for user approval, the execution of the commit, and the expected return (success message with commit hash or error). It also warns not to call the tool prematurely, ensuring safe usage.

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?

The description is appropriately sized and well-structured: it starts with the purpose, then provides a critical numbered workflow, followed by parameter details and return value. It is slightly verbose due to explicit step-by-step instructions, but every sentence is meaningful and earns its place.

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 comprehensive for the tool's complexity: it covers the workflow, parameters, and return value. Although an output schema is not provided in the data (context says 'Has output schema: true' but no schema shown), the description concisely states 'Returns: Success message with commit hash or error,' which is sufficient for a straightforward commit operation.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema: it specifies that the message should follow the 50/72 rule, clarifies that user_approved must be True and represents user consent, and explains that repo_path is optional and defaults to Claude's working directory. This compensates for the 0% schema description coverage.

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 states 'Execute git commit with a user-approved commit message,' specifying the action (commit), resource (git), and the key condition (user-approved). It is distinct from sibling tools like get_commit_context (diff retrieval) and create_pr (pull request creation).

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

Usage Guidelines5/5

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

The description provides a detailed, step-by-step workflow that must be followed exactly, including calling get_commit_context first, generating and showing a commit message to the user, obtaining approval, and only then invoking this tool with user_approved=True. It explicitly states 'DO NOT call this tool in the same response where you generate the commit message,' providing clear guidance on when to use it.

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/kmandana/DevNarrate'

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