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
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Git diff content (usually from git_diff tool) | |
| files | No | List of changed files (optional) | |
| stats | No | Git diff stats (optional) | |
| promptName | No | Prompt name or file path (e.g., "conventional", "a", "./my-prompt.md"). If not specified, uses default.md |