Skip to main content
Glama
git-commit-message-mcp

git-commit-message-mcp

by halfmoonvic

generate_commit_message_prompt

Build an AI prompt from a git diff to generate commit messages, optionally using custom or built-in prompt templates.

Instructions

Generate AI prompt for commit message based on diff.

Supports custom prompts:

  • Use promptName to specify a prompt (e.g., "conventional", "simple", "a", "b")

  • Prompts are loaded from: user prompts directory > built-in prompts

  • If no promptName specified, uses default.md

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": {
      "diff": "<diff>"
    },
    "name": "generate_commit_message_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
diffYesGit diff content (usually from git_diff tool)
filesNoList of changed files (optional)
statsNoGit diff stats (optional)
promptNameNoPrompt name or file path (e.g., "conventional", "a", "./my-prompt.md"). If not specified, uses default.md

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the prompt resolution order (user prompts directory over built-in prompts) and the default.md fallback, which is real behavioral context. However, it never states that the output is the prompt text rather than a generated commit message, nor whether any AI call or external access occurs.

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 purpose is front-loaded in the first sentence, followed by a compact bulleted section on custom prompts. The only waste is the opaque example set ('a', 'b'), which adds little clarity, but overall the definition is tight and well-structured.

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?

For a simple four-parameter tool with one required input, the description covers prompt selection and resolution order adequately. With no annotations and no output schema, it leaves the return value (prompt text vs. commit message) and side-effect profile unstated, which is a meaningful gap for a tool whose name alone could be misread.

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 the schema already documents all four parameters, including promptName examples and the default.md fallback. The description restates these examples and adds the loading precedence, which is marginal added meaning over the schema. Baseline 3 is appropriate.

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 states a specific verb and resource: generate an AI prompt for a commit message from a diff. It is clear what the tool produces and what input drives it. It does not explicitly distinguish itself from siblings such as git_diff or list_prompts, though the schema's note that the diff usually comes from git_diff partially covers this.

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

Usage Guidelines3/5

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

Usage is implied by the purpose (you have a diff and want a commit-message prompt), and the custom-prompt section hints at when to supply promptName. There is no explicit when-to-use vs when-not guidance, and no mention of alternatives for getting a diff or listing available prompts.

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